Find a value after the value already found

eliozo

Board Regular
Joined
Oct 22, 2010
Messages
80
A​
B​
C​
D​
1​
Country
Product Size
Type of product
Quantity
2​
USA​
100g​
Regular​
3000​
3​
Brazil​
100g​
Regular​
5000​
4​
USA​
100g​
Regular​
4000​
5​
6​








A​
B​
USA, 100g, Regular​
1​
=IF(AND(A2="USA",B2="100g", C2="Regular"),D2,IF(AND(A3="USA",B3="100g", C3="Regular"),D3,if(…)) à in this case it will display 3000​
I need a formula to find depending on the country, product size and type of product, after the value found in A1, in this example I need to display 4000 and not 3000



If im not clear enough please let me know.
The second table shows all the quantites of USA , 100g , regular, quantities.. so i want to show all the quantities related to these criterias. Thank you !
 
Last edited by a moderator:

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Check if the following is what you need.
It is an array formula.

Dante Amor
ABCDEF
1CountryProduct SizeType of productQuantityQuantity
2USA100gRegular30004000
3Brazil100gRegular50003000
4USA100gRegular4000 
Hoja2
Cell Formulas
RangeFormula
F2:F4F2=IFERROR(INDEX($D$2:$D$4,LARGE(IF("USA|100g|Regular"=$A$2:$A$4&"|"&$B$2:$B$4&"|"&$C$2:$C$4,ROW($A$2:$A$4)),ROWS($G$2:G2))-1),"")
Press CTRL+SHIFT+ENTER to enter array formulas surrounded with curly braces.
 
Upvote 0
What is the G column u entered in the formula ? Because i cant see any G in your book
 
Upvote 0
ROWS($G$2:G2)

The formula uses column G only to count the number of data we need to display.
In this example, the formula in F2 shows the first data.
The formula in F3 shows the second data and so on.
Sorry for putting column G in the formula and not showing it on the screen.
But you can use the following make more sense.


=IFERROR(INDEX($D$2:$D$4,LARGE(IF("USA|100g|Regular"=$A$2:$A$4&"|"&$B$2:$B$4&"|"&$C$2:$C$4,ROW($A$2:$A$4)),ROWS($A$2:A2))-1),"")

Note: Press CTRL+SHIFT+ENTER to enter array formulas surrounded with curly braces.
 
Upvote 0
Did you try the data sample that I put in post #2?
 
Upvote 0
I share my file with the formula inserted correctly.
There you will see how the formula works and gets the values 4000 and 3000.

 
Upvote 0

Forum statistics

Threads
1,215,002
Messages
6,122,652
Members
449,092
Latest member
peppernaut

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