G198
G198

Reputation: 43

Trouble with Vlookup on power queries?

So it's a simple function,


=vlookup(a23,sheet3!a:e,5,0)


I have two vlookup both returning from a power query, one works and the other doesn't both are formatted in exactly the same way and both query's are very similar (no obvious differences)


Query one (Sheet 2)


Query Two (Sheet 3)


Formulas


As you can see the vlookup returns values from sheet3 but not sheet2 even though there are differences. I have re-written it many times and changed the 0 - false in the formula with no changes.

Upvotes: 0

Views: 2479

Answers (3)

user26505447
user26505447

Reputation: 1

I had this issue - had to turn the PowerQuery to 'whole number' from text, even though the excel was in general format, to get it to work.

Upvotes: 0

Tim Wilkinson
Tim Wilkinson

Reputation: 3801

Check you sheet names, from the screenshots it would appear that Sheet2 does not exist, only Sheet1, Sheet3, and Sheet5.

EDIT edited question makes this answer currently irrelevant

Upvotes: 0

teylyn
teylyn

Reputation: 35915

Unfortunately, your screenshot shows only the formulas, not the error messages. Errors are important when troubleshooting.

Check the data types. It looks as if the data in column A in the second screenshot is numeric, whereas column A in the first screenshot definitely contains text, as can be seen by the trailing / signs in some cells. Ensure that the lookup value and the first column of the lookup table are the same data type. Numbers may look like numbers, but could be stored as text. Non-matching data types will cause the #N/A error.

Upvotes: 2

Related Questions