Sum visible cell above + formula in selected row

data08

New Member
Joined
Aug 23, 2016
Messages
2
Hi

I have a data set which is filtered. I have supplied the original data set, the cells in formula format, and the subsequent filtered data.

I calculate a formula in column F from data in each row. I then calculate a running balance in column G, which simply adds the formula in column F to the prior balance in the cell above.
E.g. Balance in G3 = G2 + F3

The problem is when I filter the data so that I need the running balance of the cell directly above.
e.g. G4 = G2 + F4

I have tried using subtotal but it does not seem to like this variation. My dataset is thousand of lines long so it is causing me a problem as it's too time consuming to go through each row in the filtered set.

Does anyone have any ideas?

[TABLE="width: 455"]
<!--StartFragment--> <colgroup><col width="65" span="7" style="width:65pt"> </colgroup><tbody>[TR]
[TD="width: 65"]A[/TD]
[TD="width: 65"]B[/TD]
[TD="width: 65"]C[/TD]
[TD="width: 65"]D[/TD]
[TD="width: 65"]E[/TD]
[TD="width: 65"]F[/TD]
[TD="width: 65"]G[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD] Date[/TD]
[TD="class: xl63"]Probability[/TD]
[TD="class: xl64"]Return[/TD]
[TD="class: xl64"]Equity[/TD]
[TD="class: xl64"]Profit[/TD]
[TD="class: xl64"]Balance[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="class: xl66, align: right"]01-Jan[/TD]
[TD="class: xl65"]-4.28[/TD]
[TD="class: xl65"]-4.90[/TD]
[TD="class: xl65"]5.00[/TD]
[TD="class: xl65"]-24.50[/TD]
[TD="class: xl65"]-24.50[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="class: xl66, align: right"]02-Jan[/TD]
[TD="class: xl65"]1.52[/TD]
[TD="class: xl65"]-6.60[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]-33.00[/TD]
[TD="class: xl65"]-57.50[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="class: xl66, align: right"]03-Jan[/TD]
[TD="class: xl65"]-7.02[/TD]
[TD="class: xl65"]-0.05[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]-0.25[/TD]
[TD="class: xl65"]-57.75[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD="class: xl66, align: right"]04-Jan[/TD]
[TD="class: xl65"]-0.48[/TD]
[TD="class: xl65"]-0.05[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]-0.25[/TD]
[TD="class: xl65"]-58.00[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD="class: xl66, align: right"]05-Jan[/TD]
[TD="class: xl65"]-1.19[/TD]
[TD="class: xl65"]-0.05[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]-0.25[/TD]
[TD="class: xl65"]-58.25[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD="class: xl66, align: right"]06-Jan[/TD]
[TD="class: xl65"]-1.39[/TD]
[TD="class: xl65"]-0.05[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]-0.25[/TD]
[TD="class: xl65"]-58.50[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD="class: xl66, align: right"]07-Jan[/TD]
[TD="class: xl65"]-2.96[/TD]
[TD="class: xl65"]-0.05[/TD]
[TD="class: xl65"]10.00[/TD]
[TD="class: xl65"]-0.25[/TD]
[TD="class: xl65"]-58.75[/TD]
[/TR]
[TR]
[TD="align: right"]9[/TD]
[TD="class: xl66, align: right"]08-Jan[/TD]
[TD="class: xl65"]-0.42[/TD]
[TD="class: xl65"]-0.05[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]-0.25[/TD]
[TD="class: xl65"]-59.00[/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD="class: xl66, align: right"]09-Jan[/TD]
[TD="class: xl65"]-1.09[/TD]
[TD="class: xl65"]8.55[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]42.75[/TD]
[TD="class: xl65"]-16.25[/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD="class: xl66, align: right"]10-Jan[/TD]
[TD="class: xl65"]-1.74[/TD]
[TD="class: xl65"]7.60[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]38.00[/TD]
[TD="class: xl65"]21.75[/TD]
[/TR]
[TR]
[TD="align: right"]12[/TD]
[TD="class: xl66, align: right"]11-Jan[/TD]
[TD="class: xl65"]-3.50[/TD]
[TD="class: xl65"]-4.40[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]-22.00[/TD]
[TD="class: xl65"]-0.25[/TD]
[/TR]
[TR]
[TD="align: right"]13[/TD]
[TD="class: xl66, align: right"]12-Jan[/TD]
[TD="class: xl65"]-1.98[/TD]
[TD="class: xl65"]-0.05[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]-0.25[/TD]
[TD="class: xl65"]-0.50[/TD]
[/TR]
[TR]
[TD="align: right"]14[/TD]
[TD="class: xl66, align: right"]13-Jan[/TD]
[TD="class: xl65"]-1.99[/TD]
[TD="class: xl65"]-0.05[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]-0.25[/TD]
[TD="class: xl65"]-0.75[/TD]
[/TR]
[TR]
[TD="align: right"]15[/TD]
[TD="class: xl66, align: right"]14-Jan[/TD]
[TD="class: xl65"]-1.32[/TD]
[TD="class: xl65"]-0.05[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]-0.25[/TD]
[TD="class: xl65"]-1.00[/TD]
[/TR]
[TR]
[TD="align: right"]16[/TD]
[TD="class: xl66, align: right"]15-Jan[/TD]
[TD="class: xl65"]0.30[/TD]
[TD="class: xl65"]-0.05[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]-0.25[/TD]
[TD="class: xl65"]-1.25[/TD]
[/TR]
[TR]
[TD="align: right"]17[/TD]
[TD="class: xl66, align: right"]16-Jan[/TD]
[TD="class: xl65"]-1.67[/TD]
[TD="class: xl65"]-0.05[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]-0.25[/TD]
[TD="class: xl65"]-1.50[/TD]
[/TR]
[TR]
[TD="align: right"]18[/TD]
[TD="class: xl66, align: right"]17-Jan[/TD]
[TD="class: xl65"]-1.39[/TD]
[TD="class: xl65"]-0.05[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]-0.25[/TD]
[TD="class: xl65"]-1.75[/TD]
[/TR]
[TR]
[TD="align: right"]19[/TD]
[TD="class: xl66, align: right"]18-Jan[/TD]
[TD="class: xl65"]-5.26[/TD]
[TD="class: xl65"]-0.05[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]-0.25[/TD]
[TD="class: xl65"]-2.00[/TD]
[/TR]
[TR]
[TD="align: right"]20[/TD]
[TD="class: xl66, align: right"]19-Jan[/TD]
[TD="class: xl65"]-0.51[/TD]
[TD="class: xl65"]-0.05[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]-0.25[/TD]
[TD="class: xl65"]-2.25[/TD]
[/TR]
<!--EndFragment--></tbody>[/TABLE]

FORMULAS:

[TABLE="width: 910"]
<!--StartFragment--> <colgroup><col width="130" span="7" style="width:130pt"> </colgroup><tbody>[TR]
[TD="width: 130"]A[/TD]
[TD="width: 130"]B[/TD]
[TD="width: 130"]C[/TD]
[TD="width: 130"]D[/TD]
[TD="width: 130"]E[/TD]
[TD="width: 130"]F[/TD]
[TD="width: 130"]G[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Date[/TD]
[TD="class: xl63"]Probability[/TD]
[TD="class: xl64"]Return[/TD]
[TD="class: xl64"]Equity[/TD]
[TD="class: xl64"]Profit[/TD]
[TD="class: xl64"]Balance[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD="class: xl66"]42370[/TD]
[TD="class: xl65"]-4.27[/TD]
[TD="class: xl65"]-4.9[/TD]
[TD="class: xl65"]5[/TD]
[TD="class: xl65"]=D3*E3[/TD]
[TD="class: xl65"]=F3[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD="class: xl66"]42371[/TD]
[TD="class: xl65"]1.51[/TD]
[TD="class: xl65"]-6.6[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]=D4*$E$3[/TD]
[TD="class: xl65"]=G3+F4[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD="class: xl66"]42372[/TD]
[TD="class: xl65"]-7.01[/TD]
[TD="class: xl65"]-0.05[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]=D5*$E$3[/TD]
[TD="class: xl65"]=G4+F5[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD="class: xl66"]42373[/TD]
[TD="class: xl65"]-0.48[/TD]
[TD="class: xl65"]-0.05[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]=D6*$E$3[/TD]
[TD="class: xl65"]=G5+F6[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD="class: xl66"]42374[/TD]
[TD="class: xl65"]-1.19[/TD]
[TD="class: xl65"]-0.05[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]=D7*$E$3[/TD]
[TD="class: xl65"]=G6+F7[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD="class: xl66"]42375[/TD]
[TD="class: xl65"]-1.38[/TD]
[TD="class: xl65"]-0.05[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]=D8*$E$3[/TD]
[TD="class: xl65"]=G7+F8[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD="class: xl66"]42376[/TD]
[TD="class: xl65"]-2.95[/TD]
[TD="class: xl65"]-0.05[/TD]
[TD="class: xl65"]10[/TD]
[TD="class: xl65"]=D9*$E$3[/TD]
[TD="class: xl65"]=G8+F9[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD="class: xl66"]42377[/TD]
[TD="class: xl65"]-0.42[/TD]
[TD="class: xl65"]-0.05[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]=D10*$E$3[/TD]
[TD="class: xl65"]=G9+F10[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD="class: xl66"]42378[/TD]
[TD="class: xl65"]-1.08[/TD]
[TD="class: xl65"]8.55[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]=D11*$E$3[/TD]
[TD="class: xl65"]=G10+F11[/TD]
[/TR]
<!--EndFragment--></tbody>[/TABLE]
[TABLE="width: 455"]
<!--StartFragment--> <colgroup><col width="65" span="7" style="width:65pt"> </colgroup><tbody>[TR]
[TD="width: 65"][/TD]
[TD="width: 65"][/TD]
[TD="width: 65"][/TD]
[TD="width: 65"][/TD]
[TD="width: 65"][/TD]
[TD="width: 65"][/TD]
[TD="width: 65"][/TD]
[TD="width: 65"][/TD]
[/TR]
</tbody>[/TABLE]
FILTERED:

[TABLE="width: 455"]
<!--StartFragment--> <colgroup><col width="65" span="7" style="width:65pt"> </colgroup><tbody>[TR]
[TD="width: 65"]A[/TD]
[TD="width: 65"]B[/TD]
[TD="width: 65"]C[/TD]
[TD="width: 65"]D[/TD]
[TD="width: 65"]E[/TD]
[TD="width: 65"]F[/TD]
[TD="width: 65"]G[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]Date[/TD]
[TD="class: xl63"]Probability[/TD]
[TD="class: xl64"]Return[/TD]
[TD="class: xl64"]Equity[/TD]
[TD="class: xl64"]Profit[/TD]
[TD="class: xl64"]Balance[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="class: xl66, align: right"]01-Jan[/TD]
[TD="class: xl65"]-4.28[/TD]
[TD="class: xl65"]-4.90[/TD]
[TD="class: xl65"]5.00[/TD]
[TD="class: xl65"]-24.50[/TD]
[TD="class: xl65"]-24.50[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="class: xl66, align: right"]03-Jan[/TD]
[TD="class: xl65"]-7.02[/TD]
[TD="class: xl65"]-0.05[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]-0.25[/TD]
[TD="class: xl65"]-25.00[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD="class: xl66, align: right"]07-Jan[/TD]
[TD="class: xl65"]-2.96[/TD]
[TD="class: xl65"]-0.05[/TD]
[TD="class: xl65"]10.00[/TD]
[TD="class: xl65"]-0.25[/TD]
[TD="class: xl65"]-25.25[/TD]
[/TR]
[TR]
[TD="align: right"]12[/TD]
[TD="class: xl66, align: right"]11-Jan[/TD]
[TD="class: xl65"]-3.50[/TD]
[TD="class: xl65"]-4.40[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]-22.00[/TD]
[TD="class: xl65"]-27.25[/TD]
[/TR]
[TR]
[TD="align: right"]19[/TD]
[TD="class: xl66, align: right"]18-Jan[/TD]
[TD="class: xl65"]-5.26[/TD]
[TD="class: xl65"]-0.05[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"]-0.25[/TD]
[TD="class: xl65"]-27.50[/TD]
[/TR]
<!--EndFragment--></tbody>[/TABLE]
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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