VLOOKUP MATCH Not returning all results

RJSIGKITS

Board Regular
Joined
Apr 15, 2013
Messages
109
Hi Guys.
I wonder if anyone could help to shed some light on something I'm struggling with here.. I'm trying to do a simple VLOOKUP MATCH as follows:
On Sheet 'HomeQuote' I have a DV dropdown in cell D15 that the user selects a model, in this example selecting H1.
('Home Quote'!$D$15)

I have a table called 'QtyTable' on sheet 'Costs'. This has the different models in the top headers along C1:O1 (Headers)
Components are listed in A2:A155, with the quantity of components required for each model listed below the model.

On sheet 'SOL', I am trying to make a component Qty order list for the specific model selected.
Column A has the same components listed as per 'QtyTable' I need the quantities to return for the model in column B

The formula that I have been trying to use in column B on my SOL sheet is:
Code:
=IF(A3="","",VLOOKUP(A3,QtyTable,MATCH('Home Quote'!$D$15,QtyTable[#Headers],0)))
This code is then copied down the rest of the column.

It seems to work for the first 5 rows, where it does return the correct qty for the model selected, but then everything below this is returning zero's, #NA's and random incorrect quantities in cells that shouldn't have a quantity...

I've been going round and round in circles with this, and I'm not getting anywhere...
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
From what you describe i cant see any problem that immediately comes to mind. Certainly cant explain randomness as i cant see that thats possible. In the first row that produces an erroneous result check what the MATCH produces and that the lookup value is in the leftmost column of the lookup table.
 
Upvote 0
You haven't specified the final argument in the vlookup formula, so it's doing an approximate match, try
=IF(A3="","",VLOOKUP(A3,QtyTable,MATCH('Home Quote'!$D$15,QtyTable[#Headers],0),0))
 
Upvote 0
It looks like the problem might be the missing exact match.

=IF(A3="","",VLOOKUP(A3,QtyTable,MATCH('Home Quote'!$D$15,QtyTable[#Headers],0),0))

edit:- must learn to type faster
 
Last edited:
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,255
Members
448,556
Latest member
peterhess2002

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