Results 1 to 3 of 3

Thread: Solved: Excel 2003 - how do I Auto Fill a Formula down to the Last Row in a Column?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Expert
    Joined
    Sep 2010
    Posts
    604
    Location

    Solved: Excel 2003 - how do I Auto Fill a Formula down to the Last Row in a Column?

    Edit: Never mind, I had a typo with Range("N16").AutoFill Range("N16:J" & LastRow - 1) should be N not J

    Corrected that and it works fine
    -------------------------------------------------------------------------------------------------------
    Hi,

    I am creating a formula in Cell N16 and need to copy that formula down about 20,000 rows to one row less than the last row in Column N

    I am using Column B as the column to determine the last row because it always has data.

    I am trying to use AutoFill to perform the task, but I guess I'm using it incorrectly as it is not doing anything.

    I have verified the formula is correct in cell N16 and I have verified that the Last row is determined correctly.
    [vba] Dim LastRow As Long

    LastRow = ActiveSheet.[B65536].End(xlUp).Row

    Range("N16").FormulaR1C1 = "=RC[-5]*RC[-2]+RC[-4]"

    Application.ScreenUpdating = False
    '''''''''''''''''''''''''''''''''''''''''''''''''Edit: Solved typo by replacing the J with N
    Range("N16").AutoFill Range("N16:N" & LastRow - 1) 'Range("N16").AutoFill Range("N16:J" & LastRow - 1)

    Application.ScreenUpdating = True[/vba]
    Last edited by frank_m; 12-14-2010 at 06:51 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •