macro
By END I am assuming that you want to autofill down as far as the last used
row in another column. Is this correct? If so, then you can find the last
used row in an adjacent column and concatenate that in the range as per the
following. The code finds the last used row in column A. Edit that to another
column if necessary.
Dim lastRow As Long
'Edit the "A" in the following line to match
'the column to test for last row
lastRow = Cells(Rows.Count, "A").End(xlUp).Row
Range("B9").Select
Selection.AutoFill Destination:=Range("B9:B" & lastRow), Type:=xlFillDefault
Range("B9:B" & lastRow).Select
--
Regards,
OssieMac
" VLOOKUP fORMULA" wrote:
dEAR aLL,
Can anybody help me please....
Here is a simple macro which copy formulas from B9 till B33
Is there any way I can name the cell B40 as "END" and copy the formulas
until END
if so what I should add more in this code?
Sub Macro1()
' Macro1 Macro
Range("B9").Select
Selection.AutoFill Destination:=Range("B9:B33"), Type:=xlFillDefault
Range("B9:B33").Select
End Sub
Thanks
|