ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Vlookup error (https://www.excelbanter.com/excel-worksheet-functions/270921-vlookup-error.html)

wesley holtman

Vlookup error
 
Hello,

I've got a Vlookup formula that when I execute it, it totally changes
the lookup array. I entered the range "Cusip" as the lookup array in
the VBE but it shows up as "CorpA" in the spreadsheet. What am I doing
wrong?

VBE:

Corp.Range("BC4").Resize(DataRow, 1).FormulaR1C1 = "=VLOOKUP(RC[-50],"
& Cusip.Address(external:=True, ReferenceStyle:=xlR1C1) & ",3,FALSE)

Spreadsheet:

=VLOOKUP(E12,CorpA!$A$1:$D$2027,4,FALSE)

Thanks,
Wes


All times are GMT +1. The time now is 01:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com