help with vlookup in macro

  • Thread starter Thread starter Himansu
  • Start date Start date
H

Himansu

Hello everyone,

Anyone know what's wrong with this formula? It's embedded in a macro that
I'm writing.
 
here's the formula:


ActiveCell.FormulaR1C1 =
"VLOOKUP(LEFT(rc1,4)&"2"&RIGHT(rc1,LEN(rc1)-5)," & JobNumber &
"_keycodes!R1C1:R150C3,3,FALSE)"
 
Hi,

The 2 between the 2 strings is a bit confusing. I assume you want this

ActiveCell.Formula = "=VLOOKUP(LEFT(rc1,4)" & "&2&" &
"RIGHT(rc1,LEN(rc1)-5)," & JobNumber & "keycodes!R1C1:R150C3,3,FALSE)"


Mike
 
THANKS Mike!!!!!! I was trying to figure this out for the last 2 days....
 

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