Finding the largest item within a period using an Array Formula

nyx1234

New Member
Joined
Jun 7, 2018
Messages
4
Item no.CatagoryDateAmt
AT011/1/201710
AT011/5/201715
AT015/5/201820
BT011/1/201715
BT011/1/201715
BT021/1/201715
.....

<tbody>
</tbody>













I'm trying to determine the item no. under catagory "T01", within a period from 1/1/2017 to 1/31/2017 contributed highest amt, without using sum column or helper column. Is there a way to do this?

For example here, the sum of Item A under T01 within this period 25 and the sum of item B under T01 within this period is 30 - the highest based on the data provided is "item B"

I want to show the information in the list below, Red text are determined by formular.
Description
CatagoryStart DateEnd DateItem no.Amt
Top Item Jan17
T011/1/20171/31/2017B
30
Second Item Jan17T01
1/1/20171/31/2017A
25
Top item Jan17T01 and T011/1/2017
1/31/2017B
45

<tbody>
</tbody>

I have researched online to find the answer - but it's quite difficult to apply the logic - I attached the links here -

Find Largest Sum and Item using an Array Formula:
https://www.mrexcel.com/forum/excel-questions/855461-find-largest-sum-item-using-array-formula.html

How to find the item with the largest sum in a table range?
https://www.extendoffice.com/documents/excel/4068-excel-find-largest-sum.html

Thank you for your kind attention!
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Given the type of your question, the following link would be more appropriate:
https://www.mrexcel.com/forum/excel-questions/915809-top-10-clients-without-using-pivot-table.html?highlight=jon999

Taking up your goal, that is, "I'm trying to determine the item no. under catagory "T01", within a period from 1/1/2017 to 1/31/2017 contributed highest amt, without using sum column or helper column", consider the following.



Book1
ABCDEFGH
1Item no.CatagoryDateAmtT01highest amt
2AT011/1/2017101/1/201730
3AT011/5/2017151/31/2017item
4AT015/5/201820B
5BT011/1/201715Q
6BT011/1/201715
7BT021/1/201715
8QT011/12/20175
9QT011/13/201725
Sheet1


In H2 control+shift+enter, not just enter:

=MAX(SUMIFS($D$2:$D$9,$A$2:$A$9,IF(FREQUENCY(IF(1-($A$2:$A$9=""),MATCH($A$2:$A$9,$A$2:$A$9,0)),ROW($A$2:$D$9)-ROW(INDEX($A$2:$D$9,1,1))+1),$A$2:$A$9),$B$2:$B$9,F1,$C$2:$C$9,">="&$F$2,$C$2:$C$9,"<="&$F$3))

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

=IFERROR(INDEX($A$2:$A$9,SMALL(IF(SUMIFS($D$2:$D$9,$A$2:$A$9,IF(FREQUENCY(IF(1-($A$2:$A$9=""),MATCH($A$2:$A$9,$A$2:$A$9,0)),ROW($A$2:$D$9)-ROW(INDEX($A$2:$D$9,1,1))+1),$A$2:$A$9),$B$2:$B$9,$F$1,$C$2:$C$9,">="&$F$2,$C$2:$C$9,"<="&$F$3)=$H$2,ROW($A$2:$D$9)-ROW(INDEX($A$2:$D$9,1,1))+1),ROWS($H$4:H4))),"")
 
Upvote 0

Forum statistics

Threads
1,214,967
Messages
6,122,503
Members
449,090
Latest member
RandomExceller01

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