Help with vba code please

  • [xpost][/xpost]

    Hi All,


    I need help with VBA code. So following is what i want to achieve.

    1. I have data in column A starting from A2. The number of row changes everyday. Suppose, on Monday there were 5000 row, on Tuesday it can be either 5500 or 4327. So its not fixed.
    2. Column B has formula in B2. Formula is ="T"&A2
    3. The code should extend formula in column B till the last row corresponding to last row of column A.

    For example, if last row in A is 2000 then B2="T"&A2000, if last row in A is 5000 then B5000="T"&A5000

  • Hi,


    Not sure you need a macro ...


    If you want to determine the last used row in Column A

    Code
    =SUMPRODUCT(MAX((ROW(A1:A100000))*(A1:A100000<>"")))


    Hope this will help

    :)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!