Greater then running total.

Getty

New Member
Joined
Nov 28, 2017
Messages
3
Hi everyone,
I'm lost on this one and been trying different things but still can't get it to work.

I have a workbook setup, the first sheet pulls totals from other sheets. I have everything working accept one thing.
On the 1st sheet, I need the account balance to increase when there has been +$xx.xx for the day but if there has been -$xx.xx for 1 day or more, I need the previous high maintained.

The 2nd sheet is where I'm pulling most of the first sheets variables from and the 2nd sheet has the following columns.
A - Date
B - Daily Profit/Loss - This is where the user enters the data each day
C - Daily Total - Uses the formula - =IF(OR(ISBLANK(B3)), " ", C2+B3)
D - % Change - Uses the formula - =IF(OR(ISBLANK(B3))," ",(C3-C2)/C2)
E - Cumulative Total % - Uses the formula - =IF(OR(ISBLANK(B3))," ",(C3-$C$2)/$C$2)
F - Account High - Currently uses this formula.... But is only partly right - =IF(C3>C2,C3,C2)

Each formula has been dragged down the column so it will calculate each row.

At the bottom of the spreed sheet there is a 1 row gap and then a row for totals.

This is the Running $ Profit/Loss Total - B319 - Uses the formula - =SUM(B2:B317)
This is the Running Daily Total - C319 - Uses the formula - =C2+B319 (C2 = the starting account balance)

My problem is with F - Account High. I need to be able to keep the previous highest high looking back over all the previous Daily Totals as I need this previous high maintained on the 1st sheet.

My thought was to use "Greater Then" in column F to find it on the 2nd sheet, put this changing value in the Total row at F319 and then grab it at will from the 1st sheet.

But the current formula I'm using only checks back to the previous row to see if the new value is greater then or less then.
So when I get 2 or more -$xx.xx days, it fails to do the job required.


EG

DATE$ PROFIT / LOSSDAILY TOTAL% CHANGECUMMULATIVE TOTAL %ACCOUNT HIGH
22-Nov-17 $20,000.00
23-Nov-17$0.01$20,000.010.00%0.00%$20,000.01
24-Nov-17$83.38$20,083.390.42%0.42%$20,083.39
25-Nov-17-$99.99$19,983.40-0.50%-0.08%$20,083.39
26-Nov-17$106.25$20,089.650.53%0.45%$20,089.65
27-Nov-17$219.64$20,309.291.09%1.55%$20,309.29
28-Nov-17-$101.30$20,207.99-0.50%1.04%$20,309.29
29-Nov-17-$59.00$20,148.99-0.29%0.74%$20,207.99
30-Nov-17-$25.00$20,123.99-0.12%0.62%$20,148.99
1-Dec-17

<colgroup><col><col><col><col><col><col></colgroup><tbody>
</tbody>





Where you can see $20,309.29 on the 3rd last line, this should be maintained as the previous high in column F until column C once again surpasses this previous high value and column F can start increasing again.

The other thing, how do I get the ever changing "last" row in column F to update in F319 (Total) so its easy to grab for the 1st sheet?

I hope that's clear....

If not, let me know what else I can provide and I'll try.

Thanks for any help.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Is this what you want?

Excel 2010
ABCDEF
1DATE$ PROFIT / LOSSDAILY TOTAL% CHANGECUMMULATIVE TOTAL %ACCOUNT HIGH
222-Nov-17$20,000.00
323-Nov-17$0.01$20,000.010.00%0.00%$20,000.01
424-Nov-17$83.38$20,083.390.42%0.42%$20,083.39
525-Nov-17-$99.99$19,983.40-0.50%-0.08%$20,083.39
626-Nov-17$106.25$20,089.650.53%0.45%$20,089.65
727-Nov-17$219.64$20,309.291.09%1.55%$20,309.29
828-Nov-17-$101.30$20,207.99-0.50%1.04%$20,309.29
929-Nov-17-$59.00$20,148.99-0.29%0.74%$20,309.29
1030-Nov-17-$25.00$20,123.99-0.12%0.62%$20,309.29

<colgroup><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
F3=MAX($C$2:C3)
F4=MAX($C$2:C4)
F5=MAX($C$2:C5)
F6=MAX($C$2:C6)
F7=MAX($C$2:C7)
F8=MAX($C$2:C8)
F9=MAX($C$2:C9)
F10=MAX($C$2:C10)

<tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
Is this what you want?

Excel 2010
ABCDEF
1DATE$ PROFIT / LOSSDAILY TOTAL% CHANGECUMMULATIVE TOTAL %ACCOUNT HIGH
222-Nov-17$20,000.00
323-Nov-17$0.01$20,000.010.00%0.00%$20,000.01
424-Nov-17$83.38$20,083.390.42%0.42%$20,083.39
525-Nov-17-$99.99$19,983.40-0.50%-0.08%$20,083.39
626-Nov-17$106.25$20,089.650.53%0.45%$20,089.65
727-Nov-17$219.64$20,309.291.09%1.55%$20,309.29
828-Nov-17-$101.30$20,207.99-0.50%1.04%$20,309.29
929-Nov-17-$59.00$20,148.99-0.29%0.74%$20,309.29
1030-Nov-17-$25.00$20,123.99-0.12%0.62%$20,309.29

<tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
F3=MAX($C$2:C3)
F4=MAX($C$2:C4)
F5=MAX($C$2:C5)
F6=MAX($C$2:C6)
F7=MAX($C$2:C7)
F8=MAX($C$2:C8)
F9=MAX($C$2:C9)
F10=MAX($C$2:C10)

<tbody>
</tbody>

<tbody>
</tbody>


Thank you SO much!

That fixed it perfectly. I then added the following to tidy up the rest of the spreadsheet when the other cells on the row are empty.


=IF(OR(ISBLANK(B3))," ",MAX($C$2:C3))

Exactly what I needed!
Thank you!
 
Upvote 0
I should also add the steps I took in case anyone else needs it in the future.

I first entered Scott T's formula into F3.
=MAX($C$2:C3)
Then dragged that formula all the way down to the Total row at F319.

I deleted the formula from F318 to create a blank cell.

Then went back to F3 and added in the rest of the formula so that it will show empty cells if no data is in B column.
=IF(OR(ISBLANK(B3))," ",MAX($C$2:C3))
Then dragged this new formula down to F317.

This way, the Total at F319 is always up to date no matter the row the data is entered down to in column B but any empty rows are not printing cells in column F.

Fixed everything for me and works like a dream!
Thanks again Scott T! I had been going around in circles for a bit over a day with this.
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,267
Members
449,075
Latest member
staticfluids

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