Select a Range on excel based on the values that match a criteria in other columns

RLSegundo

New Member
Joined
Sep 18, 2013
Messages
4
Hi there,

I'm trying to select a range based on the values in the 2 first columns.
So, looking at the image below, I want to select the range in column C that relate to Store1 - Device1 for example.
Then I would like to format values on the C column and move on to the next criteria, wich is Store2 - Device1, format that C column range, etc.

I listed in Column F and G the possible combinations.

Thanks in advance.



Example1.jpg
 
F2: [TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64"] =INDEX(A$2:A$20,SMALL(IF(FREQUENCY(IF(A$2:A$20<>"",MATCH(A$2:A$20,A$2:A$20,0)),ROW(A$2:A$20)-ROW(A$2)+1),ROW(A$2:A$20)-ROW(A$2)+1),ROWS(F$2:F2))) C-S-E copy down[/TD]
[/TR]
</tbody>[/TABLE]
G2: [TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64"] =INDEX(B$2:B$20,SMALL(IF(FREQUENCY(IF(B$2:B$20<>"",MATCH(B$2:B$20,B$2:B$20,0)),ROW(B$2:B$20)-ROW(B$2)+1),ROW(B$2:B$20)-ROW(B$2)+1),ROWS(G$2:G2))) if you only keep absolute references on row, you can copy formula from F2 to G2
H2: print numbers horizontally on a row [TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64"] =INDEX($C$2:$C$20,SMALL(IF(FREQUENCY(IF($A$2:$A$20=$F$2,IF($B$2:$B$20=$G$2,MATCH($C$2:$C$20,$C$2:$C$20,0))),ROW($C$2:$C$20)-ROW($C$2)+1),ROW($C$2:$C$20)-ROW($C$2)+1),COLUMNS($H$2:H2))) C-S-E copy accross[/TD]
[/TR]
</tbody>[/TABLE]

[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

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