![]() |
Double Vlookup Problem
This is a random issue, but I'm hoping some of you have experienced it before
and will be able to help. I'm using Visual Studio 2005 but its very similar to VBA so any feedback will be very helpful. oApp and LCV refer to excel applications. Ok I'm trying to do 2 vlookups using 2 different spread sheets. My first Vlookup works fine: On Error Resume Next tmp = oApp.WorksheetFunction.VLookup(oApp.Range("A" & i).Value, LCV.Range("A3:H" & lastRow2).Value, 8, False) On Error GoTo 0 then when I have to do another vlookup: On Error Resume Next tmp1 = LCV.WorksheetFunction.VLookup(LCV.Range("A" & n).Value, oApp.Range("A3:F" & lastRow).Value, 2, False) On Error GoTo 0 tmp1 returns nothing...although the value is there, it won't let me search within a table array that has already been referred to in another vlookup. Even when I try it manually in excel it doesn't work. The reason I'm doing this is because I'm adding rows to oApp from LCV that aren't there. Any logical ideas around this? Thanks in advance! |
All times are GMT +1. The time now is 10:01 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com