using autofill

G

Gazza

Hi

I have a spreadsheet with varying numbers of rows of data depending on the
download. I have a custom function that runs in column H depending on the
entry in column B. What I would like to do via vba is having set the
function up in cell H2 to autofill this down column H until there are no
more entries in column B.

thanks

Gaz
 
G

Gord Dibben

Sub Auto_Fill()
Dim Lrow As Long
With ActiveSheet
Lrow = Range("B" & Rows.Count).End(xlUp).Row
Range("H2:H" & Lrow).FillDown
End With
End Sub


Gord Dibben MS Excel MVP
 
G

Gazza

Thanks Gord

kind regards

Gaz


Gord Dibben said:
Sub Auto_Fill()
Dim Lrow As Long
With ActiveSheet
Lrow = Range("B" & Rows.Count).End(xlUp).Row
Range("H2:H" & Lrow).FillDown
End With
End Sub


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top