Need help formulating an equation in excel

I have a summary worksheet where I track all of my option investments. I want to systematically withdraw money from my trading balance. I formulated an equation that gives me the ideal withdraw amount for a given balance. I decided to make the withdraw whenever my account balance doubled. When the balance doubles I make the withdraw and I don't make another withdraw until this new balance doubles again. The next withdraw will be calculated using this new balance as well. Anyone have any idea how to set this up? Right now I have a column that tracks the balance every week after my trades.(I can send you the document and give you a visual if you're having difficulty understanding) I'm not the most experienced excel user as you can see.
You just need a wee bit of really easy VBA, methinks...
 
VBA easy, scan back till last withdraw, check if balance is doubled, drop the required withdraw into a cell and repeat.
 
  • Like
Reactions: MJM
Could you repeat that with the columns in my spreadsheet (see attached jpeg), I'm not that proficient in VBA. The first column from the right is the normal balance after weekly returns. The second column is the same thing but it subtracts the withdraw when it happens. The third is the withdraw itself. Fourth is the returns, with the shaded cells being the net weekly returns.
 
Last edited:
Spreadsheet
 

Attachments

  • spreadsheet.jpg
    spreadsheet.jpg
    134.3 KB · Views: 76
You could create a column called Withdrawal.
Withdrawal will be set default value = 0;
Your new account balance thus is (account balance-withdrawal).

Now to change the value of withdrawal, as stated above
a IF ( new account > 2* starting account) withdrawal = starting account
you might want to put 2 additional columns : new account balance, starting account balance
and update starting account balance each time withdrawal is not nul.
 
  • Like
Reactions: MJM
The issue is if multiple lines for orders youd have to keep telling it where the last deposit was to work out when to take money out.

Its only a few lines of code, in vb6 I dont do a lot of direct excel vba, but can do if needs be.
 
Back
Top