ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Vlookup always gives me #NA (https://www.excelbanter.com/excel-worksheet-functions/73364-vlookup-always-gives-me-na.html)

napko

Vlookup always gives me #NA
 
I have a shee1 like this
A B C
D
ID sub-id grp_id
value
72 6308 1006308_30072 -103686.5016
72 6308 1006308_30072 103686.5016
73 6308 1006308_30073 -103686.5016
73 6308 1006308_30073 103686.5016
50 3338 1013338_30950 -2084777.338
51 3339 1013339_30951 -622559.5433

in another sheet I have data like this
A B C D E
F
Date trade sub-id cval grp_id
2/20/06 72 6308 102726.2239 1006308_30072
2/20/06 73 6308 -102726.2239 1006308_30073
2/20/06 50 3338 0 1013338_30950
2/20/06 51 3339 0 1013339_30951
2/20/06 74 4532 -13688891.94 1014532_30074
2/20/06 75 4533 1555032.903 1014533_30075

I want to fill the column F with value from sheet 1 based on grp_id.
How can i do that



SteveG

Vlookup always gives me #NA
 

Vlookup should work you just have to be sure that the array you are
pulling the data from starts with the grp-id column or column C. If
your Vlookup was referring to column A as the first column, that is
where it is looking for the grp id which it is not located in so you
get the NA error.

Try it like this in column F.

=VLOOKUP(E1,LookupSheetC1:D6,2,FALSE)

If it is not there, the VLOOKUP will return an NA error also.

Does that help?

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=515509


paul

Vlookup always gives me #NA
 
but vlookup wont look to the LEFT of grp id you will have to use index/match
for that
--
paul
remove nospam for email addy!



"SteveG" wrote:


Vlookup should work you just have to be sure that the array you are
pulling the data from starts with the grp-id column or column C. If
your Vlookup was referring to column A as the first column, that is
where it is looking for the grp id which it is not located in so you
get the NA error.

Try it like this in column F.

=VLOOKUP(E1,LookupSheetC1:D6,2,FALSE)

If it is not there, the VLOOKUP will return an NA error also.

Does that help?

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=515509



SteveG

Vlookup always gives me #NA
 

True. VLOOKUP will not look to the left but given the example in the
OP, the value is to the right of the grpID. The other option would be
to use the ID field for the lookup if the ID's are unique to the grpIDs
which it appears they are in the sample data.

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=515509



All times are GMT +1. The time now is 07:35 PM.

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