Lookup value with same criteria

ryan0521

Board Regular
Joined
Dec 7, 2016
Messages
79
Happy new year!

Can anyone help me with this one.

I want to separate values base on their criteria, please see below for the data.
Look up valueCriteria
100Apple
101Apple
102Apple
103Apple
200Ball
201Ball
202Ball
203Ball
204Ball
300Cat
301Cat
302Cat

<tbody>
</tbody>


And I want to have a result like this

AppleBallCat
1100200300
2101201301
3102202302
4103203
5204

<tbody>
</tbody>


Thanks in advance
 
Last edited:

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Look up valueCriteria453
100Appleappleballcat
101Apple100200300
102Apple101201301
103Apple102202302
200Ball103203
201Ball204
202Ball
203Ball
204Ball
300Cat
301Cat
302Cat

<tbody>
</tbody>


In D1 enter and copy across:

=COUNTIFS($B$2:$B$13,D$2)

In D3 control+shift+enter, not just enter, copy across, and down:

=IF(ROWS(D$3:D3)>D$1,"",INDEX($A$2:$A$13,SMALL(IF($B$2:$B$13=D$2,ROW($A$2:$A$13)-ROW($A$2)+1),ROWS(D$3:D3))))
 
Upvote 0

Forum statistics

Threads
1,214,978
Messages
6,122,549
Members
449,089
Latest member
davidcom

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