View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
juan juan is offline
external usenet poster
 
Posts: 29
Default Fill formula down to last data row

Hello All,
I have following code:

Dim Lastrow As Long
Lastrow = ActiveSheet.Cells(Rows.Count, "A").End
(xlUp).Row
Worksheets("TEST1").Select
Range("O1").Select
ActiveCell.FormulaR1C1 = "=OFFSET(RC[-14],0,R1C16)"
Range("O1:O" & Lastrow).Filldown
Worksheets("TEST2").Select
Range("O1").Select
ActiveCell.FormulaR1C1 = "=OFFSET(RC[-14],0,R1C16)"
Range("O1:O" & Lastrow).Filldown
The first sheet does seem to work but the second sheet it
fills down only to the 8 row, which in the first sheet
that's how far data goes. So I need to fill the formula
down to last data row of each sheet.
Please advise with any help.
thank you,
Juan