Insert formulas

F

Francis

How do I insert formulas into various ranges to the last rows where column A
have its last data,
assuming that I want to have the following formula from row 2 to last row
with data in column A, let say A200
column B2 down, insert =VLOOKUP(C2,SI!$A$2:$F$200,5,0)
column C2 down, insert =VLOOKUP(E2,OLT!$A$2:$B$48,2,0)
column D2 down, insert =VLOOKUP(O2,Rate!$C$2:$I$15,7)

TIA
--
Hope this is helpful

Pls click the Yes button below if this post provide answer you have asked

Thank You

cheers, francis

Am not a greek but an ordinary user trying to assist another
 
P

Per Jessen

Hi

Try this:

Sub InsertFormulas()
LastRow = Range("A2").End(xlDown).Row
Range("B2").Formula = "=VLOOKUP(C2,SI!$A$2:$F$200,5,0)"
Range("C2").Formula = "=VLOOKUP(E2,OLT!$A$2:$B$48,2,0)"
Range("D2").Formula = "=VLOOKUP(O2,Rate!$C$2:$I$15,7)"

Range("B2:D" & LastRow).FillDown
End Sub

Best regards,
Per
 

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