Home |
Search |
Today's Posts |
#1
|
|||
|
|||
why doesn't my conditional formula work?
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 |
#2
|
|||
|
|||
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 |
#3
|
|||
|
|||
=IF(B3="Buy", G3*(F3-E3), G3*(E3-F3))
-- HTH RP (remove nothere from the email address if mailing direct) "jake" wrote in message ... 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 |
#4
|
|||
|
|||
cheers all, typically enough i figured this out myself immediately after
posting. when excel help illustrates the use of the IF function it uses square brackets for some reason... thanks anyway :) "Bob Phillips" wrote: =IF(B3="Buy", G3*(F3-E3), G3*(E3-F3)) -- HTH RP (remove nothere from the email address if mailing direct) "jake" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
4 Day Work Week in a formula | Excel Discussion (Misc queries) | |||
Excel 97 - Adding Every 8th Row - Formula should work, but doesn't | Excel Worksheet Functions | |||
formula won't work | Excel Worksheet Functions | |||
formula won't work | Excel Worksheet Functions | |||
Formula Dependant Conditional Formatting | Excel Discussion (Misc queries) |