Calculate stake based on cumulative bank

honkin

Active Member
Joined
Mar 20, 2012
Messages
385
Office Version
  1. 2016
Platform
  1. MacOS
I have a sheet keeping track of football results and I want to test it using different staking, rather than just level stakes (ie 1 unit on every bet)

Starting Bank is in J2

So I want to stake to win a % of the bank. That formula is very easy; it is basically (current bank * 0.02)/(odds -1) In my case =(J2*0.02)/(Z5-1). That works fine for the first row, but of course the next row now needs to reflect the profit or loss from the row above, as the bank will have changed. Again, it is not difficult to do. This time it is (cumulative bank * 0.02)/(odds-1). In my case =(Q5*0.02)/(Z6-1)

The difficulty arises with filtered data, as the purpose of this is to test various scenarios to see what gives the best overall profit. Once data is filtered, unless the first row of data, Row 5, is still in place, there is now no row above to reference. When filtered, the now visible first row would again need to reference the starting bank in J2 and not the cumulative bank in column Q in the row above.

Cell Formulas
RangeFormula
N5N5=(J2*0.02)/(Z5-1)
O5:O25O5=IF(K5="WON",N5*(Z5-1),-N5)
P5:P25P5=SUBTOTAL(109,$O$5:O5)
Q5:Q25Q5=$J$2+P5
N6:N25N6=(Q5*0.02)/(Z6-1)
Named Ranges
NameRefers ToCells
solver_adj=Predictology!$Z$5:$Z$2985N5:O5
solver_lhs1=Predictology!$Z$5:$Z$2984N5:O5
solver_lhs2=Predictology!$Z$5:$Z$2984N5:O5


Column N is where the staking calculation is done. I thought of having the cells in N reference the cumulative profit, Column P, but again, in a filtered sheet, how can I keep this accurately calculating it based the current bank?

Any help gladly accepted.
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Forum statistics

Threads
1,224,810
Messages
6,181,079
Members
453,021
Latest member
Justyna P

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