Jim
If pool is a name of a cell containing your lookup value, other things being equal, there shouldn't be a problem.
What does it return?
Aladin
Pool is a variable name that contains 6 digits but when the macro passes this formula to another cell, "Pool" (without the quotes) comes through instead of the 6 digits. I can go into the cell and replace the word "Pool" with the 6 digits and everything is rosy.
Here is the line from the macro:
.Range("C" & CompRow) = "=VLOOKUP(Pool,'N:\shared\Servicing\CountryWide Sub-Serv\First File\[summaryx.xls]summary'!$D$6:$M$200,10,false)"
Hi Jim
As you are using a variable you have to use the Amperstand to join it with your other Text.
.Range("C" & CompRow) = "=VLOOKUP(" & Pool & ",'N:\shared\Servicing\CountryWide Sub-Serv\First File\[summaryx.xls]summary'!$D$6:$M$200,10,false)"
Dave
OzGrid Business Applications
Wouldn't INDIRECT(Pool) work?
====================== Pool is a variable name that contains 6 digits but when the macro passes this formula to another cell, "Pool" (without the quotes) comes through instead of the 6 digits. I can go into the cell and replace the word "Pool" with the 6 digits and everything is rosy.
Thanks to all for the assistance!!!