filldown using macros

  • Thread starter Thread starter qiong
  • Start date Start date
Q

qiong

hi

I would like to create a macro that selects a range according to a
calculated result, and then filldowns a formula.

My calculated result is displayed in a cell whose forumla
={Max(IF(ISNUMBER(B3:B1055),ROW(B3:B1055)))}

Say this displays 87.

I would like the macro to select E3:BM3 to filldown (87-3=84) rows.
(Cells E3:BM3 contains Vlookup formulas.)
Is this possible?

Thanks in advance
Keng
 
Try this with in cell A1 the formula
={Max(IF(ISNUMBER(B3:B1055),ROW(B3:B1055)))}


Sub test2()
Dim Lrow As Long
Lrow = Range("A1").Value
Range("E3:BM" & Lrow).FillDown
End Sub
 

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

Back
Top