Finding the largest item within a period using an Array Formula

nyx1234

New Member
Joined
Jun 7, 2018
Messages
4
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]Item no.[/TD]
[TD]Catagory[/TD]
[TD]Date[/TD]
[TD]Amt[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]T01[/TD]
[TD]1/1/2017[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]T01[/TD]
[TD]1/5/2017[/TD]
[TD]15[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]T01[/TD]
[TD]5/5/2018[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]T01[/TD]
[TD]1/1/2017[/TD]
[TD]15[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]T01[/TD]
[TD]1/1/2017[/TD]
[TD]15[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]T02[/TD]
[TD]1/1/2017[/TD]
[TD]15[/TD]
[/TR]
[TR]
[TD].....[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]













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.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Description
[/TD]
[TD]Catagory[/TD]
[TD]Start Date[/TD]
[TD]End Date[/TD]
[TD]Item no.[/TD]
[TD]Amt[/TD]
[/TR]
[TR]
[TD]Top Item Jan17
[/TD]
[TD]T01[/TD]
[TD]1/1/2017[/TD]
[TD]1/31/2017[/TD]
[TD]B
[/TD]
[TD]30
[/TD]
[/TR]
[TR]
[TD]Second Item Jan17[/TD]
[TD]T01
[/TD]
[TD]1/1/2017[/TD]
[TD]1/31/2017[/TD]
[TD]A
[/TD]
[TD]25
[/TD]
[/TR]
[TR]
[TD]Top item Jan17[/TD]
[TD]T01 and T01[/TD]
[TD]1/1/2017
[/TD]
[TD]1/31/2017[/TD]
[TD]B
[/TD]
[TD]45
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

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

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
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,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

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