R
Rob
Excel 2000
I need to copy a formula in cell C3 down to the last row of data in Column
B?
I have a range in column B that charges size ie. the number of rows vary,
but always starts in B3. I then has a single formula in cell C3 which needs
to be copied down to the last row of the range in column B.
The following works so long as the range in column B end at row 180. How
can I set the range each time the code runs?
Thanks, Rob
Sub Macro1()
Range("B3:C3").Select
Range("C3").Activate
Range(Selection, Selection.End(xlDown)).Select
Range("C3:C180").Select 'THIS needs to be a variable
Selection.FillDown
Selection.Copy
Selection.PasteSpecial Paste:=xlValues
End Sub
I need to copy a formula in cell C3 down to the last row of data in Column
B?
I have a range in column B that charges size ie. the number of rows vary,
but always starts in B3. I then has a single formula in cell C3 which needs
to be copied down to the last row of the range in column B.
The following works so long as the range in column B end at row 180. How
can I set the range each time the code runs?
Thanks, Rob
Sub Macro1()
Range("B3:C3").Select
Range("C3").Activate
Range(Selection, Selection.End(xlDown)).Select
Range("C3:C180").Select 'THIS needs to be a variable
Selection.FillDown
Selection.Copy
Selection.PasteSpecial Paste:=xlValues
End Sub