View Single Post
  #2   Report Post  
tjtjjtjt
 
Posts: n/a
Default

You want G3 mulitplied by the result of F3-E3 for true?
and
You want G3 mulitplied by the result of E3-F3 for false?

If so, you should not be using square brackets--replace them with parentheses.
Also, you shouldn't have any spaces in the formula.
=IF(B3="Buy",(G3*(F3-E3)),(G3*(E3-F3)))

tj

"jake" wrote:

can anyone tell me why the following doesn't work?

=IF(B3="Buy", [G3*(F3-E3)], [G3*(E3-F3)])

or possibly suggest another way of achieving the same result, so that a
'Buy' transaction will produce one calculation, and a 'Sell' (or non-'Buy)
transaction will produce another?

cheers