Index Match Large Frequency formula

bsquad

Board Regular
Joined
Mar 15, 2016
Messages
194
I am looking to add something like a FREQUENCY criteria to this

Code:
=IFERROR(INDEX($B$2:$B$5000,MATCH(SUMPRODUCT(LARGE(($E$2:$E$5000=1)*($M$2:$M$5000),ROWS($A$1:A1))),IF(($E$2:$E$5000=1),$M$2:$M$5000),0)),"")

I have my index categories in Col B, and my LARGE in Col M, Col E is just a Month - if its equal to a Month number. I would like to add a FREQUENCY criteria to my index categories (Col B). i.e. if the category/text occurs 4 times then do the index-match-large.
FREQUENCY or COUNTIF(s)
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Care to describe what you want to solve in words along with an input sample and the output based this input sample?
 
Last edited:
Upvote 0
absolutely

so basically in the table below it would Index Cat 3 first since it has a count of 3 occurrences (most out of any of them) , next it would be Cat 4 then 5, then 2, since all 3 have 2 occurrences and if you were to sum by category and take the largest first it would be Cat 4, 5, 2. Its basically a smart filter or something like a pivot.

I must have an outdated Forum tools but ignore the first row and the first column
Excel 2013 32 bit
[TABLE="class: head"]
<tbody>[TR]
[TH] [/TH]
[TH]
M
[/TH]
[TH]
N
[/TH]
[TH]
O
[/TH]
[/TR]
[TR]
[TD]
17
[/TD]
[TD]Col B[/TD]
[TD]Col E[/TD]
[TD]Col M[/TD]
[/TR]
[TR]
[TD]
18
[/TD]
[TD]Category[/TD]
[TD]MONTH[/TD]
[TD]Cost/Qty[/TD]
[/TR]
[TR]
[TD]
19
[/TD]
[TD]Cat 1[/TD]
[TD]
1​
[/TD]
[TD]
$1,202​
[/TD]
[/TR]
[TR]
[TD]
20
[/TD]
[TD]Cat 2[/TD]
[TD]
1​
[/TD]
[TD]
$431​
[/TD]
[/TR]
[TR]
[TD]
21
[/TD]
[TD]Cat 3[/TD]
[TD]
1​
[/TD]
[TD]
$2,404​
[/TD]
[/TR]
[TR]
[TD]
22
[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D]
37
[/TD]
[TD]Cat 19[/TD]
[TD]
2​
[/TD]
[TD]
$1​
[/TD]
[/TR]
[TR]
[TD]
38
[/TD]
[TD]Cat 20[/TD]
[TD]
2​
[/TD]
[TD]
$900​
[/TD]
[/TR]
[TR]
[TD]
39
[/TD]
[TD]Cat 21[/TD]
[TD]
2​
[/TD]
[TD]
$839​
[/TD]
[/TR]
[TR]
[TD]
40
[/TD]
[TD]Cat 22[/TD]
[TD]
2​
[/TD]
[TD]
$45​
[/TD]
[/TR]
[TR]
[TD]
41
[/TD]
[TD]Cat 3[/TD]
[TD]
2​
[/TD]
[TD]
$2,404​
[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid"]
<tbody>[TR]
[TD]Sheet: Sheet2[/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:
Upvote 0
Ok, this is your input.


Book1
ABC
1CategoryMONTHCost/Qty
2Cat 11$1,202
3Cat 21$431
4Cat 31$2,404
5Cat 41$3,625
6Cat 51$793
7Cat 61$1
8Cat 71$1,162
9Cat 81$187
10Cat 91$560
11Cat 101$4,873
12Cat 111$0
13Cat 121$71
14Cat 131$0
15Cat 22$726
16Cat 32$1,202
17Cat 42$431
18Cat 52$2,404
19Cat 172$793
20Cat 192$1
21Cat 202$900
22Cat 212$839
23Cat 222$45
24Cat 32$2,404
Sheet1


Care to post the output which must obtain the above input?
 
Upvote 0
Yes, that was the input.

Here is the output

[TABLE="width: 128"]
<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl63, width: 64"]Cat 3[/TD]
[TD="class: xl64, width: 64"]$6,010 [/TD]
[/TR]
[TR]
[TD="class: xl63, width: 64"]Cat 4[/TD]
[TD="class: xl64, width: 64"]$4,056 [/TD]
[/TR]
[TR]
[TD="class: xl63, width: 64"]Cat 5[/TD]
[TD="class: xl64, width: 64"]$3,197 [/TD]
[/TR]
[TR]
[TD="class: xl63, width: 64"]Cat 2[/TD]
[TD="class: xl64, width: 64"]$1,157 [/TD]
[/TR]
</tbody>[/TABLE]

I am not really looking for the 2nd column with the dollar amounts, thats just so you could visually see the logic for my desired order.
>>its like a hierarchy order of the count of categories, then by total dollar amount, if that makes sense
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,246
Members
452,623
Latest member
cliftonhandyman

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