Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
emrobertson
 
Posts: n/a
Default IF function with value_if_true and value_if_false as equations

=IF(C9="S",(D9-F9),(F9-D9))
What I'm trying to accomplish is if I am "short", 'C" column, a contract,
then subtract my exit price, 'F' column, from my entry price, 'D' column. If
I am not "short", then I would like to subtract D from F. As I have this
function written, the answers it shows are not the answers to the equations
in paranthesis but the first value in the equations i.e. if C9 does equal S
then the answer given is D9 not D9-F9
Excel 2002 (10.2614.2625)
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Vito
 
Posts: n/a
Default IF function with value_if_true and value_if_false as equations


Are all your cells formatted as numbers?


--
Vito
------------------------------------------------------------------------
Vito's Profile: http://www.excelforum.com/member.php...o&userid=29182
View this thread: http://www.excelforum.com/showthread...hreadid=489199

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Vito
 
Posts: n/a
Default IF function with value_if_true and value_if_false as equations


Are all your cells formatted as numbers?

What result do you get if C9 is not "S"?


--
Vito
------------------------------------------------------------------------
Vito's Profile: http://www.excelforum.com/member.php...o&userid=29182
View this thread: http://www.excelforum.com/showthread...hreadid=489199

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
emrobertson
 
Posts: n/a
Default IF function with value_if_true and value_if_false as equations

All the cells in column C are letters, either S for short, or L for long

"Vito" wrote:


Are all your cells formatted as numbers?


--
Vito
------------------------------------------------------------------------
Vito's Profile: http://www.excelforum.com/member.php...o&userid=29182
View this thread: http://www.excelforum.com/showthread...hreadid=489199


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
emrobertson
 
Posts: n/a
Default IF function with value_if_true and value_if_false as equations

I had values in all columns, C, D, and F. C is a letter and D, F are numbers.
I wrote my initial equation =IF(C9="S",(D9-F9),(F9-D9)) after having several
rows worth of data. Except for the actual row in which I tried my equation.
I left out the F column number. All said and done, the function works. I am
just an idiot for not checking all the fields first.
Thanks for trying to help me Vito.

"Vito" wrote:


Are all your cells formatted as numbers?

What result do you get if C9 is not "S"?


--
Vito
------------------------------------------------------------------------
Vito's Profile: http://www.excelforum.com/member.php...o&userid=29182
View this thread: http://www.excelforum.com/showthread...hreadid=489199


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



All times are GMT +1. The time now is 08:41 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"