Yes, take it out of the string and concatenate the variable in its place
(that will put in the value in the variable rather than its name).
activecell.formulaR1C1 = "= VLOOKUP(RC[-1],Sheet1!C[-1]:C[75]," & hdr &
",0)"
I got a feeling the above line will word wrap in your newsreader. If it
does, the above was meant to be all on one line.
Rick
> Is there a way to use a variable in Vlookup?
>
[quoted text clipped - 12 lines]
>> >
>> > Any help is appreciated
Kelvin - 22 Dec 2007 05:29 GMT
Amazing. Works like a charm.
Thanks Rick , that was incredibly helpful.

Signature
KWB
> Yes, take it out of the string and concatenate the variable in its place
> (that will put in the value in the variable rather than its name).
[quoted text clipped - 23 lines]
> >> >
> >> > Any help is appreciated
Rick Rothstein (MVP - VB) - 22 Dec 2007 05:32 GMT
You are welcome. The key thing to remember is anything you put inside quote
marks is text, characters without any code meaning, and nothing else.
Rick
> Amazing. Works like a charm.
> Thanks Rick , that was incredibly helpful.
[quoted text clipped - 30 lines]
>> >> >
>> >> > Any help is appreciated