Need help formulating an equation in excel

Discussion in 'Options' started by MJM, Mar 7, 2015.

  1. xandman

    xandman

    Sent you PM.
     
    #11     Mar 7, 2015
    MJM likes this.
  2. You just need a wee bit of really easy VBA, methinks...
     
    #12     Mar 8, 2015
  3. Turveyd

    Turveyd

    VBA easy, scan back till last withdraw, check if balance is doubled, drop the required withdraw into a cell and repeat.
     
    #13     Mar 8, 2015
    MJM likes this.
  4. MJM

    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: Mar 8, 2015
    #14     Mar 8, 2015
  5. MJM

    MJM

    Spreadsheet
     
    #15     Mar 8, 2015
  6. bh_prop

    bh_prop

    Post your Excel file here
     
    #16     Mar 9, 2015
  7. MJM

    MJM

    It won't let me post the excel file, just a jpeg
     
    #17     Mar 9, 2015
  8. If you are willing to enter the New Balance into a cell, say below the $7500 Draw Cell, it then becomes a simple matter of an If formula, else it gets more complicated.
     
    #18     Mar 9, 2015
  9. 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.
     
    #19     Mar 9, 2015
    MJM likes this.
  10. Turveyd

    Turveyd

    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.
     
    #20     Mar 9, 2015
    i am nobody and MJM like this.