Sum cell and split the value into 2 cells

harieta

New Member
Joined
Mar 16, 2023
Messages
27
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Impossible or just too complicated for me to write a formula
XX2BL below
I would appreciate your assistance
thank you

I have values in various cells from F2 to Y2 that i need adding together but the sum of it put in 2 cells if certain conditions are met
C2<B2 sum cells F2: Y2 only until they reach the difference between B2 and C2 (in my example 10), if there sum of F2:Y2 is more than that remaining value enter into cell E2
if C2 = B2 sum all cell values and enter the value in E2

formula.xlsx
BCDEFGHIJKLMNOPQRSTUVWXY
1fullparttop uprestvar 1var 2var 3var 4var 5var 6var 7var 8var 9var 10var 11var 12var 13var 14var 15var 16var 17var 18var 19var 20
2302015251
3
4
5if c2<b2 then count cell values f2:y2 with ceiling of difference (b2-c2), remaining value to go to e2
6if c2=b2, then nothing in d2, all values in e2
7
Sheet1
 
Last edited:

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
you need to select the range of cells in the worksheet before you click "mini sheet".
 
Upvote 1
How about
Excel Formula:
=IF(C2<B2,MIN(SUM(F2:Y2),B2-C2),"")
and
Excel Formula:
=LET(s,SUM(F2:Y2),IF(D2="",s,s-D2))
 
Upvote 0
Solution

Forum statistics

Threads
1,215,068
Messages
6,122,950
Members
449,095
Latest member
nmaske

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