Function to replicate filter needed - time sensitive

Status
Not open for further replies.

colinheslop1984

Board Regular
Joined
Oct 14, 2016
Messages
129
Office Version
  1. 2016
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]A1 STYLE[/TD]
[TD]B DEPARTMENT[/TD]
[TD]C CATEGORY[/TD]
[TD]D COLOUR[/TD]
[TD]E VALUE[/TD]
[/TR]
[TR]
[TD]ADRIANA[/TD]
[TD]WOMENS[/TD]
[TD]JERSEY[/TD]
[TD]PLUM[/TD]
[TD]210[/TD]
[/TR]
[TR]
[TD]MAIZEY[/TD]
[TD]WOMENS[/TD]
[TD]NIGHTWEAR[/TD]
[TD]TEAL[/TD]
[TD]205[/TD]
[/TR]
[TR]
[TD]JACOB[/TD]
[TD]MENS[/TD]
[TD]KNITWEAR[/TD]
[TD]NAVY[/TD]
[TD]178[/TD]
[/TR]
[TR]
[TD]HAYWOOD[/TD]
[TD]WOMENS[/TD]
[TD]KNITWEAR[/TD]
[TD]YELLOW[/TD]
[TD]150[/TD]
[/TR]
[TR]
[TD]PENGUIN[/TD]
[TD]WOMENS[/TD]
[TD]NIGHTWEAR[/TD]
[TD]PURPLE[/TD]
[TD]105[/TD]
[/TR]
[TR]
[TD]ORGANIC[/TD]
[TD]MENS[/TD]
[TD]JERSEY[/TD]
[TD]BLUE[/TD]
[TD]79[/TD]
[/TR]
</tbody>[/TABLE]












I have a table of data like the one above only larger. I want to create a top 10 list based on criteria, the criteria being column's B and C.

I would like the below table to populate itself in order of value if column B meets the desired criteria's, e.g. women's AND nightwear. In essence it will work just like a filter

[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]DEPARTMENT CRITERIA (E.G. WOMENS)[/TD]
[TD]CATEGORY CRITERIA (E.G. NIGHTWEAR)[/TD]
[/TR]
</tbody>[/TABLE]



[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]STYLE[/TD]
[TD]COLOUR[/TD]
[TD]VALUE[/TD]
[/TR]
[TR]
[TD]*FUNCTION NEEDED[/TD]
[TD]*FUNCTION NEEDED[/TD]
[TD]*FUNCTION NEEDED[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]









DESIRED RESULT BELOW

[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[/TR]
[TR]
[TD]STYLE[/TD]
[TD]COLOUR[/TD]
[TD]VALUE[/TD]
[/TR]
[TR]
[TD]MAIZY[/TD]
[TD]TEAL[/TD]
[TD]205[/TD]
[/TR]
[TR]
[TD]PENGUIN[/TD]
[TD]PURPLE[/TD]
[TD]105[/TD]
[/TR]
[TR]
[TD]AND SO ON[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]







Any suggestions would be much appreciated
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
How about


Excel 2013/2016
ABCDEFGHIJ
1A1 STYLEB DEPARTMENTC CATEGORYD COLOURE VALUEWomensA1 STYLED COLOURE VALUE
2ADRIANAWOMENSJERSEYPLUM210NightwearMAIZEYTEAL205
3MAIZEYWOMENSNIGHTWEARTEAL205PENGUINPURPLE105
4JACOBMENSKNITWEARNAVY178
5HAYWOODWOMENSKNITWEARYELLOW150
6PENGUINWOMENSNIGHTWEARPURPLE105
7ORGANICMENSJERSEYBLUE79
Jan2
Cell Formulas
RangeFormula
H2{=IFERROR(INDEX($A$2:$E$7,SMALL(IF(($B$2:$B$7=$G$1)*($C$2:$C$7=$G$2),ROW($A$2:$A$7)-1),ROW($G1)),1),"")}
I2{=IFERROR(INDEX($A$2:$E$7,SMALL(IF(($B$2:$B$7=$G$1)*($C$2:$C$7=$G$2),ROW($A$2:$A$7)-1),ROW($G1)),4),"")}
J2{=IFERROR(INDEX($A$2:$E$7,SMALL(IF(($B$2:$B$7=$G$1)*($C$2:$C$7=$G$2),ROW($A$2:$A$7)-1),ROW($G1)),5),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
How would that formula look if I wanted to remove the criteria for column B (DEPARTMENT). SO only one criteria, that being the category column
 
Upvote 0
Just remove the part in red from each formula
=IFERROR(INDEX($A$2:$E$7,SMALL(IF(($B$2:$B$7=$G$1)*($C$2:$C$7=$G$2),ROW($A$2:$A$7)-1),ROW($G1)),1),"")
 
Upvote 0
=IFERROR(INDEX($A$2:$E$7,SMALL(IF(($B$2:$B$7=$G$1)*($C$2:$C$7=$G$2),ROW($A$2:$A$7)-1),ROW($G1)),1),"")

What about this bit at the end in red?
 
Upvote 0
Should work

Excel 2013/2016
ABCDEFGHIJ
1A1 STYLEB DEPARTMENTC CATEGORYD COLOURE VALUEA1 STYLED COLOURE VALUE
2ADRIANAWOMENSJERSEYPLUM210NightwearMAIZEYTEAL205
3MAIZEYWOMENSNIGHTWEARTEAL205PENGUINPURPLE105
4JACOBMENSKNITWEARNAVY178ORGANICBLUE79
5HAYWOODWOMENSKNITWEARYELLOW150
6PENGUINWOMENSNIGHTWEARPURPLE105
7ORGANICMENSNIGHTWEARBLUE79
Jan2
Cell Formulas
RangeFormula
H2{=IFERROR(INDEX($A$2:$E$7,SMALL(IF(($C$2:$C$7=$G$2),ROW($A$2:$A$7)-1),ROW($G1)),1),"")}
I2{=IFERROR(INDEX($A$2:$E$7,SMALL(IF(($C$2:$C$7=$G$2),ROW($A$2:$A$7)-1),ROW($G1)),4),"")}
J2{=IFERROR(INDEX($A$2:$E$7,SMALL(IF(($C$2:$C$7=$G$2),ROW($A$2:$A$7)-1),ROW($G1)),5),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
[TABLE="class: cms_table, width: 599"]
<tbody>[TR]
[TD]Rank[/TD]
[TD]Style Name[/TD]
[TD]Colour[/TD]
[TD]Units[/TD]
[TD]Value[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]STAR JUMPER[/TD]
[TD]BLU-NAVY[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]148.5[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]HAYWOOD CARDIGAN[/TD]
[TD]YEL-GOLDEN HAZE[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]143.55[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]SUZIE SWING ROLL NECK[/TD]
[TD]BLK-PHANTOM[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]110[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD]CHARLOTTE CASHMERE JUMPER[/TD]
[TD]PNK-SEASHELL[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]98[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD]ALICIA HOODIE X[/TD]
[TD]BLU-NAVY[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]55[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD]ALICIA HOODIE X[/TD]
[TD]BLU-NAVY[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]55[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD]ALICIA HOODIE X[/TD]
[TD]BLU-NAVY[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]55[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD]ALICIA HOODIE X[/TD]
[TD]BLU-NAVY[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]55[/TD]
[/TR]
[TR]
[TD="align: right"]9[/TD]
[TD]HAYWOOD CARDIGAN[/TD]
[TD]PNK-ROSE ASH[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]49.5[/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD]HAYWOOD CARDIGAN[/TD]
[TD]PNK-ROSE ASH[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]49.5[/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD]LIZZIE CARDI[/TD]
[TD]GRN-BOTTLE GRN[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]45[/TD]
[/TR]
[TR]
[TD="align: right"]12[/TD]
[TD]HAYWOOD CARDIGAN[/TD]
[TD]NAT-IVORY[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]44.55[/TD]
[/TR]
[TR]
[TD="align: right"]13[/TD]
[TD]HOLLY CHENILLE JUMPER[/TD]
[TD]PPL-DATE[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]42[/TD]
[/TR]
[TR]
[TD="align: right"]14[/TD]
[TD]HOLLY CHENILLE JUMPER[/TD]
[TD]PPL-DATE[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]42[/TD]
[/TR]
[TR]
[TD="align: right"]15[/TD]
[TD]CHARLOTTE CASHMERE JUMPER[/TD]
[TD]GRY-GREY MARL[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]39.2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Still trying to figure this one out, please can you advise?

I started off in Column E (Value column) by using =LARGE(IF('1924W'!$M:$M='Womens Knitwear (2)'!$C$3,'1924W'!$AB:$AB),A6) to gather the top 15 values based on criteria (c3)

Next in column C (Colour) I have used =INDEX('1924W'!A:V,MATCH(1,('1924W'!M:M=C$3)*('1924W'!AB:AB='Womens Knitwear (2)'!E6),0),16) This matches the colour of an item to the sales value in column E, still based on criteria C3.

In column B I use =INDEX('1924W'!A:V,MATCH(1,('1924W'!M:M=C$3)*('1924W'!AB:AB='Womens Knitwear (2)'!E6),0),4) Similar to above, this matches the name of the item to the sales value, based on criteria C3.

The problem I am having is that Column B will tend to have names repeating because there are items with same name, so I somehow need column C to remove duplicate colour but only where an item name in column B is repeated.

AND

I only want column B to repeat the item name the true amount of times. In the table above you can see an item repeated 4 times because it is basing its criteria on things that aren't unique enough. It should only be twice in this example

What can I add / do differently to get the results I need? Please add into my formula or rewrite
 
Upvote 0
Without being able to see your data, or your criteria, I've no idea.
Also as rows 5 to 8 are identical, how do you determine that they should only appear twice.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,223,923
Messages
6,175,399
Members
452,640
Latest member
steveridge

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