LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

=IF(OR(A2="Sell A",A2="Buy B"),D2-C2,C2-D2)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"carl" wrote in message
...
My data looks like so:

ColA ColB ColC ColD ColE
Product Type Price1 Price2 Profit/Loss
Sell A 38.43 39.47 1.04
Buy A 38.43 39.47 -1.04
Sell B 38.43 39.47 -1.04
Buy B 39.42 39.47 0.05

I would like a formula in ColE (Profit/Loss) to follow this logic:

If Sell and A then D-C OR if Buy and A then C-D OR if Sell and B then C-D

OR
if Buy and B then D-C

I've tried a few combo's but could not get the results as shown in the

table
above.

Thank you in advance.



 
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:58 AM.

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

About Us

"It's about Microsoft Excel"