How to get the corresponding quantity?

TropicalMagic

New Member
Joined
Jun 19, 2021
Messages
47
Office Version
  1. 365
Platform
  1. Windows
Hi all,



I have two worksheets in the same workbook



The first screenshot is Worksheet A

1A.png



The second screenshot is Worksheet B


2A.png



I would like to match the corresponding quantity to the corresponding grade in Worksheet A based on the Columns "Line", "Sub-Line", "Category", "Occasion", "Sub-Cat" and "Grade" in Worksheet B.



Question: How to get the corresponding quantity?



Many thanks!
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: How to get the corresponding quantity?
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
Based solely on the above example this should work
Excel Formula:
=VLOOKUP(B10&C10&E10&F10&D10,Sheet2!F:K,COLUMN(INDIRECT(H10&"1")),0)
 
Last edited:
Upvote 0
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: How to get the corresponding quantity?
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
Apologies in advance as I have just arrived!
 
Upvote 0
Based solely on the above example this should work
Excel Formula:
=VLOOKUP(B10&C10&E10&F10&D10,Sheet2!F:K,COLUMN(INDIRECT(H10&"1")),0)
Thanks for responding!

I found that I had to edit your code a little to get a working answer:

=VLOOKUP(CONCAT(B10,"-",C10,"-",E10,"-",F10,"-",D10),'Reference - Grading'!$F$4:$K$26,MATCH('Part 1 - Buying Template'!M10,'Reference - Grading'!$F$3:$K$3,0),FALSE)

Best regards!
 
Upvote 0
Solution
What version of Excel are you using? As 2016 does not have the CONCAT function.
 
Upvote 0
In that case you could use textjoin instead of concat, like
Excel Formula:
=VLOOKUP(TEXTJOIN("-",,B10:C10,E10:F10,D10),B!F4:K26,MATCH(I10,B!F3:K3,0),0)
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,254
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