VLOOKUP is returning #N/A

Sean15

Well-known Member
Joined
Jun 25, 2005
Messages
698
Office Version
  1. 2010
Platform
  1. Windows
Hi:

I am using VLOOKUP to pull data from one list into another list but VLOOKUP returns #NA. When I manually copy and paste lookup value from one list into the other list, VLOOKUP returns required value. I have cleaned up both list using TRIM(CLEAN), but VLOOKUP still returns #NA. I have also used Power Query to transform lists, but VLOOKUP still returns #NA. Lookup values are the same on both list – I doubled checked it. Again, when I copy and paste lookout value from one list into the other list, VLOOKUP returns required value. What else can I do to remedy this?

Regards,
S
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Sean,
Upload a sample worksheet 8-10 records that is representative of your actual file. Let us try and resolve once we can see the issues. Hard to diagnose from what you have provided.
 
Upvote 0
Here is sample data:

List of album genre PQ - Copy.xlsx
ABGH
1Album ArtistAlbumColumn7Column8
23 Doors DownAnother 700 Miles#N/A
33 Doors DownAway from the Sun Post grungealbum copied & paste from genre w/s to give required result
4CreedHuman Clay#N/A
5HoobastankThe Reason#N/A
6LifehouseLifehouse Post grungealbum copied & paste from genre w/s to give required result
7LifehouseNo Name Face Post grungealbum copied & paste from genre w/s to give required result
8Marcy PlaygroundMarcy Playground Post grungealbum copied & paste from genre w/s to give required result
9Matchbox TwentyYourself or Someone Like You Post grungealbum copied & paste from genre w/s to give required result
10Matchbox TwentyMore Than You Think You Are#N/A
11Third Eye BlindThird Eye Blind#N/A
12The CallingCamino Palmero#N/A
MM albums
Cell Formulas
RangeFormula
G2:G12G2=VLOOKUP(A2&B2,CHOOSE({1,2},genre!$A$3:$A$52&genre!$B$3:$B$52,genre!$D$3:$D$52),2,FALSE)
Press CTRL+SHIFT+ENTER to enter array formulas.



And here:

List of album genre PQ - Copy.xlsx
ABD
2BandStudio albums
33 Doors DownThe Better Life Post grunge
43 Doors DownAway from the Sun Post grunge
53 Doors DownSeventeen Days Post grunge
63 Doors Down3 Doors Down Post grunge
73 Doors DownTime of My Life Post grunge
83 Doors DownUs and the Night Post grunge
9The CallingCamino Palmero Post grunge
10The CallingTwo Post grunge
11CreedMy Own Prison Post grunge
12CreedHuman Clay Post grunge
13CreedWeathered Post grunge
14CreedFull Circle Post grunge
15HoobastankHoobastank Post grunge
16HoobastankThe Reason Post grunge
17HoobastankEvery Man For Himself Post grunge
18HoobastankFornever Post grunge
19HoobastankFight or Flight Post grunge
20HoobastankPush Pull Post grunge
21LifehouseNo Name Face Post grunge
22LifehouseStanley Climbfall Post grunge
23LifehouseLifehouse Post grunge
24LifehouseWho We Are Post grunge
25LifehouseSmoke & Mirrors Post grunge
26LifehouseAlmería Post grunge
27LifehouseOut of the Wasteland Post grunge
28Marcy PlaygroundMarcy Playground Post grunge
29Marcy PlaygroundShapeshifter Post grunge
30Marcy PlaygroundMP3 Post grunge
31Marcy PlaygroundLeaving Wonderland... in a fit of Rage Post grunge
32Marcy PlaygroundLunch, Recess & Detention Post grunge
33Matchbox TwentyYourself or Someone Like You Post grunge
34Matchbox TwentyMad Season Post grunge
35Matchbox TwentyMore Than You Think You Are Post grunge
36Matchbox TwentyNorth Post grunge
37NickelbackCurb Post grunge
38NickelbackThe State Post grunge
39NickelbackSilver Side Up Post grunge
40NickelbackThe Long Road Post grunge
41NickelbackAll the Right Reasons Post grunge
42NickelbackDark Horse Post grunge
43NickelbackHere and Now Post grunge
44NickelbackNo Fixed Address Post grunge
45NickelbackFeed the Machine Post grunge
46Third Eye BlindThird Eye Blind Post grunge
47Third Eye BlindBlue Post grunge
48Third Eye BlindOut of the Vein Post grunge
49Third Eye BlindUrsa Major Post grunge
50Third Eye BlindDopamine Post grunge
51Third Eye BlindScreamer Post grunge
52Third Eye BlindOur Bande Apart Post grunge
genre
 
Upvote 0
Try this:

=LOOKUP(2,1/(genre!$A$3:$A$52=A2)/(genre!$B$3:$B$52=B2),genre!$D$3:$D$52)
 
Upvote 0
Solution
@Phucos - still not getting expected results.

List of album genre PQ - Copy.xlsx
ABGH
1Album ArtistAlbumColumn7Column8
23 Doors DownAnother 700 Miles#N/A
33 Doors DownAway from the Sun Post grunge
4CreedHuman Clay#N/AExpected result - post grunge
5HoobastankThe Reason#N/AExpected result - post grunge
6LifehouseLifehouse Post grunge
7LifehouseNo Name Face Post grunge
8Marcy PlaygroundMarcy Playground Post grunge
9Matchbox TwentyYourself or Someone Like You Post grunge
10Matchbox TwentyMore Than You Think You Are#N/A
11Third Eye BlindThird Eye Blind#N/AExpected result - post grunge
12The CallingCamino Palmero#N/AExpected result - post grunge
MM albums
Cell Formulas
RangeFormula
G2:G12G2=LOOKUP(2,1/(genre!$A$3:$A$52=A2)/(genre!$B$3:$B$52=B2),genre!$D$3:$D$52)
 
Upvote 0
Hi:

I found solution to remove problematic characters and non-breaking space here: Remove leading and trailing spaces from text
formula: =TRIM(CLEAN(SUBSTITUTE(B3,CHAR(160)," "))) - applied to columns A and B of list 1 and list 2

Following clean up, formula in post #4 returns all required values.
Thank you Phuoc.

Regards,
S


 
Upvote 0

Forum statistics

Threads
1,215,139
Messages
6,123,263
Members
449,093
Latest member
Vincent Khandagale

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top