Help with VB in excel

MisterR

New Member
Joined
Jun 22, 2015
Messages
3
Hi guys! I am really newbie in making my formulas in excel...I mean i can calculate with simple formulas and If statements, but i am really bad in other more complex stuff..So i need some help and i would appretiate it if you can help me with the following situation:
I have to make a formula with which to distribute a common sum in the cells to the right (the same row) according to a givven quota. After the common sum falls down below the givven quota, i have to write the ending balance in the last cell.
Here is the chart:
Common sumQuotaCell1Cell2Cell3Cell4Cell5
5000100010001000100010001000
450010001000100010001000500

<tbody>
</tbody>






I would be really glad if you can help me with this problem because i cannot find a solution for it by myself!
Thanks a lot guys!
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hi, welcome to the forum.

Your thread title suggests you are looking for VBA code, but maybe a formula will suffice?


Excel 2012
ABCDEFGHI
1Common sumQuotaCell1Cell2Cell3Cell4Cell5Cell5
250001000100010001000100010000
34500100010001000100010005000
43150600600600600600600150
Sheet1
Cell Formulas
RangeFormula
D2=MAX(0,MIN($A2-$B2*(COLUMNS($D2:D2)-1),$B2))
 
Upvote 0
in cell D2 put the formula as
Code:
MIN(A2,B2)
and copy the formula for the entire column

In cell E2,
Code:
MIN($A2-SUM($D2:D2),$B2)
and copy it in the remaining cells
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,120
Members
451,399
Latest member
alchavar

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