Need help formulating an equation in excel

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

  1. Based on the jpeg, taking the first column as A and assuming we are now on cell D100, this will work

    =if(lookup(10^99,$f$1:f99)+c100>newbalance*2,+Draw,0).

    Note the lookup vector stops 1 row above current cell, else you get a circular reference.

    It presupposes you are willing to enter the new balance in a cell up top as I mentioned above. If not, I reckon you have no choice but to go with VBA.
     
    #21     Mar 9, 2015
  2. xandman

    xandman

    This is what I recommended earlier. He specifies a fixed draw and a multiplier when to draw.

    =IF(your condition, resulting balance because you have a draw, balance because no draw was made)

    =IF(R17>(S5*R6),(R17-R2),R17) // new starting balance for the next sequence of trades
     
    #22     Mar 9, 2015
  3. Turveyd

    Turveyd

    I'll sort the VBA out for him tomorrow, no worries!!

    ( I think i hate coding in Excel )
     
    #23     Mar 9, 2015
    MJM likes this.