HELP - Excel Index Match Countif two criteria

Eugenio1991

New Member
Joined
Jul 30, 2018
Messages
4
Good Day All ,
Need Help , Im trying to write a formula that will return sorted values base on two criteria, currently working with one . Example is below,

Data is from Sku to Ranking . Formula is written on the Answers line..
i need the formula to return the values per "PK" line base on the ranking given.

Current formula i use is "=IFERROR(INDEX($A$3:$A$250, MATCH(0, IF("Pk10Y"=$AF$3:$AF$250, COUNTIF($AJ$14:AJ22, $A$3:$A$250), ""), 0))," ") but only work for the Pk criteria and need to add the ranking.

any help if welcome .
Thank You.


SKUDescriptionPK LineRankingAnswers Line 1Answers Line 2Answers Line 2
75069115Org Baby Kale 100%, 6X9 oz, BIL Clam, og1375069415
75069215Org Baby Kale 100%, 6X9 oz, SPEC Clam, og2275069315
75069415Org Baby Kale 100%, 6X9 oz, SPEC BIL Clam, og1175069115
75069315Org Baby Kale 100%, 6X9 oz, Clam, og12
39000017Org Baby Spinach, 6X1 LB SPEC BIL Clam, og22
39000006Org Baby Spinach, 6X1 LB SPEC Clam, og21
39060315Org Baby Spinach, 6X1 LB BIL Clam, og32
39061615Org Baby Spinach, 6X1 LB Clam, og

<tbody>
</tbody>
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
I think your data have some problems
1. The last line is empty
Shouldn't it be: PK Line = 3 and Rank = 1?

2. There is a tie in the Ranking on lines 3 and 6.
Both lines contain PK Line 2 and Ranking 2
Is this correct?

M.
 
Upvote 0
I think your data have some problems
1. The last line is empty
Shouldn't it be: PK Line = 3 and Rank = 1?

2. There is a tie in the Ranking on lines 3 and 6.
Both lines contain PK Line 2 and Ranking 2
Is this correct?

M.

1: The data is just and example that i made just to explain what i'm trying to do.

2: Yeah that's also just and Example just to be simplified.

I looking for the formula to give me each sku for each line with the condition of the rank.

like i said i have one working for the line but i'm unable to add the other function.

I've revised the data see below. thank you !


SKU DescriptionPK LineRankingPK1Pk2Pk3
75069115Org Baby Kale 100%, 6X9 oz, BIL Clam, ogPK13
75069215Org Baby Kale 100%, 6X9 oz, SPEC Clam, ogPk22
75069415Org Baby Kale 100%, 6X9 oz, SPEC BIL Clam, ogPk11
75069315Org Baby Kale 100%, 6X9 oz, Clam, ogPk12
39000017Org Baby Spinach, 6X1 LB SPEC BIL Clam, ogPk22
39000006Org Baby Spinach, 6X1 LB SPEC Clam, ogPk21
39060315Org Baby Spinach, 6X1 LB BIL Clam, ogPk32
39061615Org Baby Spinach, 6X1 LB Clam, ogPk31

<colgroup><col><col><col><col><col span="2"><col><col span="2"></colgroup><tbody>
</tbody>
 
Upvote 0
Try


A
B
C
D
E
F
G
H
I
1
SKU​
Description​
PK Line​
Ranking​
PK1​
PK2​
PK3​
2
75069115​
Org Baby Kale 100%, 6X9 oz, BIL Clam, og​
PK1​
3​
75069415​
39000006​
39061615​
3
75069215​
Org Baby Kale 100%, 6X9 oz, SPEC Clam, og​
Pk2​
2​
75069315​
75069215​
39060315​
4
75069415​
Org Baby Kale 100%, 6X9 oz, SPEC BIL Clam, og​
Pk1​
1​
75069115​
39000017​
5
75069315​
Org Baby Kale 100%, 6X9 oz, Clam, og​
Pk1​
2​
6
39000017​
Org Baby Spinach, 6X1 LB SPEC BIL Clam, og​
Pk2​
2​
7
39000006​
Org Baby Spinach, 6X1 LB SPEC Clam, og​
Pk2​
1​
8
39060315​
Org Baby Spinach, 6X1 LB BIL Clam, og​
Pk3​
2​
9
39061615​
Org Baby Spinach, 6X1 LB Clam, og​
Pk3​
1​
10

<tbody>
</tbody>


Array formula in G2 copied across and down
=IFERROR(INDEX($A:$A,SMALL(IF(ISNA(MATCH($A$2:$A$9,G$1:G1,0)),IF($C$2:$C$9=G$1,IF($D$2:$D$9=MIN(IF(ISNA(MATCH($A$2:$A$9,G$1:G1,0)),IF($C$2:$C$9=G$1,$D$2:$D$9))),ROW($A$2:$A$9)))),1)),"")
confirmed with Ctrl+Shift+Enter, not just Enter

M.
 
Upvote 0

Forum statistics

Threads
1,215,491
Messages
6,125,098
Members
449,205
Latest member
ralemanygarcia

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