H Himansu Jan 21, 2009 #1 Hello everyone, Anyone know what's wrong with this formula? It's embedded in a macro that I'm writing.
Hello everyone, Anyone know what's wrong with this formula? It's embedded in a macro that I'm writing.
H Himansu Jan 21, 2009 #2 here's the formula: ActiveCell.FormulaR1C1 = "VLOOKUP(LEFT(rc1,4)&"2"&RIGHT(rc1,LEN(rc1)-5)," & JobNumber & "_keycodes!R1C1:R150C3,3,FALSE)"
here's the formula: ActiveCell.FormulaR1C1 = "VLOOKUP(LEFT(rc1,4)&"2"&RIGHT(rc1,LEN(rc1)-5)," & JobNumber & "_keycodes!R1C1:R150C3,3,FALSE)"
M Mike H Jan 21, 2009 #3 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
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