Inserting function into worksheet via macro

J

John mac

I am trying to write macro that will loop through a worksheet active rows and
insert a "vlookup" function into col A that will look up based on value in
col b, somethng like:
For Row = last_row To 2 Step -1
asset_code = "B" & Row
Cells(Row, 1).Formula = "=VLOOKUP(""b""& row,Constants!A19:B55,2)"
Next Row
Warning.. I am a novice at macros and VB / VBA
 
×

מיכ×ל (מיקי) ×בידן

Sorry for the TYPO. Change the third line into:
For Row = LR To 2 Step -1
Micky
 
×

מיכ×ל (מיקי) ×בידן

Sorry for the TYPO. Change the third row into:
For Row = LR To 2 Step -1
Micky
 

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