none
Autofill down RRS feed

  • Question

  • Hi All.....

    I am looking up a date in column A and stepping over to the five columns to the right of that cell and inserting formulas.......this part I can do fine.

    Now I want to fill those five columns with the formulas down as far as there are values in column A, starting at the row immediately below the row of the selection.  When I try to record a macro I only get fixed cell/ranges and this won't do ........

    Any help would be appreciated.

    Chuck, CABGx3


    Chuck, CABGx3

    Saturday, March 3, 2012 5:34 PM

Answers

  • You can determine the last used row in column A as follows:

        Dim lngMaxRow As Long
        lngMaxRow = Range("A" & Rows.Count).End(xlUp).Row

    Let's say the row where you inserted the formulas is lngRow. To fill down the formulas:

        Range("B" & lngRow & ":F" & lngMaxRow).FillDown


    Regards, Hans Vogelaar


    Saturday, March 3, 2012 8:53 PM

All replies

  • You can determine the last used row in column A as follows:

        Dim lngMaxRow As Long
        lngMaxRow = Range("A" & Rows.Count).End(xlUp).Row

    Let's say the row where you inserted the formulas is lngRow. To fill down the formulas:

        Range("B" & lngRow & ":F" & lngMaxRow).FillDown


    Regards, Hans Vogelaar


    Saturday, March 3, 2012 8:53 PM
  • INdeed........that is most helpful.

    Thank you very kindly Hans

    Chuck, CABGx3


    Chuck, CABGx3

    Saturday, March 3, 2012 9:35 PM