Sum and Allocate Amounts to first row of key with dups. only

ISW

Board Regular
Joined
May 10, 2011
Messages
78
Hi. Another question for you guys.


For key 1, for example, the total value is 19, and the max allocation value is 10. So instead of how the values are currently entered (column C), I need to change to an allocation of 10 for the first row only.

For key 2, the total value is 19, but the max allocation value is 12. So in this case, I'd need to have the value be 12 in the first row only.

Long story short, I need to sum up the values for each key, then distribute them based on the allocation values in column B but only to the first row. I am going to have to be doing this with large sheets of data and I don't want to improve my 10 key. :)

Allocated.png
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
In that case D should be =IF(A2<>A1,IF(SUMIF($A$2:$A$10,A2,$C$2:$C$10)<B2,SUMIF($A$2:$A$10,A2,$B$2:$B$10),B2),"")



Then copy down

* can't display the formula.... hang on
 
Last edited:
Upvote 0
I was wondering if I was missing something. Although, I don't see the issue. I'm going to keep at it.
 
Upvote 0
=if(a2<>a1,if(sumif($a$2:$a$10,a2,$c$2:$c$10) < b2,sumif($a$2:$a$10,a2,$b$2:$b$10),b2),"")


Ha, got it... stick that in D2 and copy down
 
Upvote 0

Forum statistics

Threads
1,224,592
Messages
6,179,774
Members
452,942
Latest member
VijayNewtoExcel

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