Get sum of above rows based on condition

nectarynes

New Member
Joined
Jun 23, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I am trying to get dynamically the sum of Column E values if the corresponding F row value is empty.
Any ideas what formula I should have on column G?
Here is the live document link:



1687537500585.png
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Hi @nectarynes
Welcome to the MrExcel forum. Please accept my warmest greetings and sincere hope that all is well.

Try the following formula in cell G2 and copy it down.

Dante Amor
ABCDEFG
1LocationDateGameStakesAmountCashoutProfit/Loss
2New York08/06/2023PLO505-oct1,5002,7201,220
3New York09/06/2023PLO505-oct3,000 
4500 
52005,0001,300
6COD22/06/2023NLH05-may500 
7500 
81,200 
92,000 
103,0001,000-6,200
11test23-jun2000300-1,700
12100 
13200 
14300 
15400 
16500 
17600 
18test223-jun70050002,200
Hoja1
Cell Formulas
RangeFormula
G2:G18G2=IF(F2="","",F2-(SUM($E$1:E2))+SUMIF($F$1:F1,"<>")-SUMIF($G$1:G1,"<>"))


--------------
Let me know the result and I'll get back to you as soon as I can.
Cordially
Dante Amor
--------------​
 
Upvote 1
Solution
Hi @nectarynes
Welcome to the MrExcel forum. Please accept my warmest greetings and sincere hope that all is well.

Try the following formula in cell G2 and copy it down.

Dante Amor
ABCDEFG
1LocationDateGameStakesAmountCashoutProfit/Loss
2New York08/06/2023PLO505-oct1,5002,7201,220
3New York09/06/2023PLO505-oct3,000 
4500 
52005,0001,300
6COD22/06/2023NLH05-may500 
7500 
81,200 
92,000 
103,0001,000-6,200
11test23-jun2000300-1,700
12100 
13200 
14300 
15400 
16500 
17600 
18test223-jun70050002,200
Hoja1
Cell Formulas
RangeFormula
G2:G18G2=IF(F2="","",F2-(SUM($E$1:E2))+SUMIF($F$1:F1,"<>")-SUMIF($G$1:G1,"<>"))


--------------
Let me know the result and I'll get back to you as soon as I can.
Cordially
Dante Amor
--------------​
Wow, you guys rock! What a forum!
 
Upvote 0
Im glad to help you. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,094
Messages
6,123,069
Members
449,092
Latest member
ipruravindra

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