Lookup duplicate value with multiple criteria

ExcelNewbie2020

Active Member
Joined
Dec 3, 2020
Messages
350
Office Version
  1. 365
Platform
  1. Windows
Sir,

I have this table i need to transform..

it should be based on country (that can be duplicate) and based on qty that is greater than 0

LOC = Criteria are Country and qty greater 0

MODEL = Criteria are Country and qty greater 0

QTY = Criteria are Country, LOC and MODEL

Book2
ABCDEF
1LOC 1LOC 2LOC 3LOC 4LOC 5
2APPLE105
3MAC355
4NOKIA
5SAMSUNG33
6ArgentinaAfghanistanYemenBahrainBurundi
7
8
9
10
11
12FORMULA HERE
13COUNTRYLOCMODELQTY
14ArgentinaLOC 1SAMSUNG3
15AfghanistanLOC 2APPLE10
16AfghanistanLOC 2MAC3
17AfghanistanLOC 2SAMSUNG3
18YemenLOC 3MAC5
19BahrainLOC 4MAC5
20BurundiLOC 5APPLE5
Sheet2


thank you very much
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
How about
Excel Formula:
=LET(d,B2:F5,HSTACK(TOCOL(IF(d<>"",B6:F6,1/0),2,1),TOCOL(IF(d<>"",B1:F1,1/0),2,1),TOCOL(IF(d<>"",A2:A5,1/0),2,1),TOCOL(d,1,1)))
 
Upvote 0
Solution
How about
Excel Formula:
=LET(d,B2:F5,HSTACK(TOCOL(IF(d<>"",B6:F6,1/0),2,1),TOCOL(IF(d<>"",B1:F1,1/0),2,1),TOCOL(IF(d<>"",A2:A5,1/0),2,1),TOCOL(d,1,1)))
it did worked.. thank you but what if we consider the country A14:A20 as a criteria?
 
Upvote 0
Will the countries in A14 down always exactly match the number of locations?
 
Upvote 0
That does not answer my question.
 
Upvote 0
In that case why do you need to lookup the values, rather than just return all the data like the formula I suggested?
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,151
Members
453,021
Latest member
Justyna P

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