Vlookup problem - unable to get the vlookup property
Hi
I've been reading posts and trying all kinds of things with no luck. Dim Char23PayorName as String Dim SumRW as Integer 'using the current row Char23PayorName = Application.VLookup(Range("A" _ & SumRW).Value, "Payor_Payee!A2:D10000", 4, False) I think the problem is in that the value returned for the lookup value is text and not a number. When debugging, it is showing the lookup value as "Nameabc". The result of this formula will be text. I have restructrued the code to put a formula in a cell. However, the #NAME? error is returned from the formula. The formula in that cell reads: =vlookup(Nameabc, Payor_Payee!A2:D10000, 4, False). If I put quotation marks around the vlookup value in the formula "Nameabc", then it works. Please help while I still remain somewhat sane. Thanks Fred |
Vlookup problem - unable to get the vlookup property
Hi,
Try this Char23PayorName = Application.VLookup(Range("A" & SumRW).Value, _ Range("Payor_Payee!A2:D10000"), 4, False) Mike "Fred" wrote: Hi I've been reading posts and trying all kinds of things with no luck. Dim Char23PayorName as String Dim SumRW as Integer 'using the current row Char23PayorName = Application.VLookup(Range("A" _ & SumRW).Value, "Payor_Payee!A2:D10000", 4, False) I think the problem is in that the value returned for the lookup value is text and not a number. When debugging, it is showing the lookup value as "Nameabc". The result of this formula will be text. I have restructrued the code to put a formula in a cell. However, the #NAME? error is returned from the formula. The formula in that cell reads: =vlookup(Nameabc, Payor_Payee!A2:D10000, 4, False). If I put quotation marks around the vlookup value in the formula "Nameabc", then it works. Please help while I still remain somewhat sane. Thanks Fred |
Vlookup problem - unable to get the vlookup property
Auuugggghhhhh! So close!
Thanks Mike, works great! "Mike H" wrote: Hi, Try this Char23PayorName = Application.VLookup(Range("A" & SumRW).Value, _ Range("Payor_Payee!A2:D10000"), 4, False) Mike "Fred" wrote: Hi I've been reading posts and trying all kinds of things with no luck. Dim Char23PayorName as String Dim SumRW as Integer 'using the current row Char23PayorName = Application.VLookup(Range("A" _ & SumRW).Value, "Payor_Payee!A2:D10000", 4, False) I think the problem is in that the value returned for the lookup value is text and not a number. When debugging, it is showing the lookup value as "Nameabc". The result of this formula will be text. I have restructrued the code to put a formula in a cell. However, the #NAME? error is returned from the formula. The formula in that cell reads: =vlookup(Nameabc, Payor_Payee!A2:D10000, 4, False). If I put quotation marks around the vlookup value in the formula "Nameabc", then it works. Please help while I still remain somewhat sane. Thanks Fred |
All times are GMT +1. The time now is 07:42 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com