Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
jake
 
Posts: n/a
Default 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   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

  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

=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   Report Post  
jake
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
4 Day Work Week in a formula EasleyK Excel Discussion (Misc queries) 1 January 29th 05 06:15 AM
Excel 97 - Adding Every 8th Row - Formula should work, but doesn't Damaeus Excel Worksheet Functions 12 January 23rd 05 04:52 PM
formula won't work tink13ub Excel Worksheet Functions 1 January 17th 05 06:59 AM
formula won't work Linette Excel Worksheet Functions 0 January 17th 05 06:05 AM
Formula Dependant Conditional Formatting LDanix Excel Discussion (Misc queries) 1 January 13th 05 06:50 PM


All times are GMT +1. The time now is 10:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"