Intermedius
New Member
- Joined
- Oct 12, 2012
- Messages
- 32
Hello, i'm looking for a cleaner way to use SUMIFS for multiple Tier structures.
My formula in the table is =SUMIFS(Table2[Quantity Sold],Table2[Quantity Sold],"<="&B2,Table2[Quantity Sold],">"&B1)
For Quantity sold, i am using =RANDBETWEEN(1,100000) just to fill the range of my dummy Tiers.
One of my issues is that in the formula in the 1st row, is referencing the header row. The other issue is that i am not ensuring that the value is between two Tiers, only less than the current row, and greater than the row before it.
[TABLE="width: 293"]
<tbody>[TR]
[TD]Fruit[/TD]
[TD]Tier[/TD]
[TD]Quantity Sold[/TD]
[TD]Formula[/TD]
[/TR]
[TR]
[TD]Apples[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]10241[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Apples[/TD]
[TD="align: right"]50[/TD]
[TD="align: right"]82869[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Apples[/TD]
[TD="align: right"]75[/TD]
[TD="align: right"]19288[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Apples[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]34180[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Apples[/TD]
[TD="align: right"]500[/TD]
[TD="align: right"]83812[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Oranges[/TD]
[TD="align: right"]20,000[/TD]
[TD="align: right"]58339[/TD]
[TD]42272[/TD]
[/TR]
[TR]
[TD]Grapes[/TD]
[TD="align: right"]10,000[/TD]
[TD="align: right"]9346[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Grapes[/TD]
[TD="align: right"]20,000[/TD]
[TD="align: right"]41955[/TD]
[TD]29529[/TD]
[/TR]
[TR]
[TD]Grapes[/TD]
[TD="align: right"]30,000[/TD]
[TD="align: right"]3397[/TD]
[TD]24364[/TD]
[/TR]
[TR]
[TD]Grapes[/TD]
[TD="align: right"]50,000[/TD]
[TD="align: right"]24364[/TD]
[TD]76135[/TD]
[/TR]
[TR]
[TD]Grapes[/TD]
[TD="align: right"]100,000[/TD]
[TD="align: right"]87525[/TD]
[TD]612345[/TD]
[/TR]
[TR]
[TD]Oranges[/TD]
[TD="align: right"]1,000[/TD]
[TD="align: right"]69222[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Oranges[/TD]
[TD="align: right"]3,000[/TD]
[TD="align: right"]61739[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Oranges[/TD]
[TD="align: right"]5,000[/TD]
[TD="align: right"]96120[/TD]
[TD]3397[/TD]
[/TR]
[TR]
[TD]Oranges[/TD]
[TD="align: right"]8,000[/TD]
[TD="align: right"]72719[/TD]
[TD]0
[/TD]
[/TR]
</tbody>[/TABLE]
My formula in the table is =SUMIFS(Table2[Quantity Sold],Table2[Quantity Sold],"<="&B2,Table2[Quantity Sold],">"&B1)
For Quantity sold, i am using =RANDBETWEEN(1,100000) just to fill the range of my dummy Tiers.
One of my issues is that in the formula in the 1st row, is referencing the header row. The other issue is that i am not ensuring that the value is between two Tiers, only less than the current row, and greater than the row before it.
[TABLE="width: 293"]
<tbody>[TR]
[TD]Fruit[/TD]
[TD]Tier[/TD]
[TD]Quantity Sold[/TD]
[TD]Formula[/TD]
[/TR]
[TR]
[TD]Apples[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]10241[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Apples[/TD]
[TD="align: right"]50[/TD]
[TD="align: right"]82869[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Apples[/TD]
[TD="align: right"]75[/TD]
[TD="align: right"]19288[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Apples[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]34180[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Apples[/TD]
[TD="align: right"]500[/TD]
[TD="align: right"]83812[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Oranges[/TD]
[TD="align: right"]20,000[/TD]
[TD="align: right"]58339[/TD]
[TD]42272[/TD]
[/TR]
[TR]
[TD]Grapes[/TD]
[TD="align: right"]10,000[/TD]
[TD="align: right"]9346[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Grapes[/TD]
[TD="align: right"]20,000[/TD]
[TD="align: right"]41955[/TD]
[TD]29529[/TD]
[/TR]
[TR]
[TD]Grapes[/TD]
[TD="align: right"]30,000[/TD]
[TD="align: right"]3397[/TD]
[TD]24364[/TD]
[/TR]
[TR]
[TD]Grapes[/TD]
[TD="align: right"]50,000[/TD]
[TD="align: right"]24364[/TD]
[TD]76135[/TD]
[/TR]
[TR]
[TD]Grapes[/TD]
[TD="align: right"]100,000[/TD]
[TD="align: right"]87525[/TD]
[TD]612345[/TD]
[/TR]
[TR]
[TD]Oranges[/TD]
[TD="align: right"]1,000[/TD]
[TD="align: right"]69222[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Oranges[/TD]
[TD="align: right"]3,000[/TD]
[TD="align: right"]61739[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Oranges[/TD]
[TD="align: right"]5,000[/TD]
[TD="align: right"]96120[/TD]
[TD]3397[/TD]
[/TR]
[TR]
[TD]Oranges[/TD]
[TD="align: right"]8,000[/TD]
[TD="align: right"]72719[/TD]
[TD]0
[/TD]
[/TR]
</tbody>[/TABLE]