If in column (A) I have a "B" for buy and a "SS" for sell short. Then in column (B) I have the fill price of a certain stock such as "$98.5" for example. Then in Colomn (C) I have the Closing price for this particular stock such as "$99.5."(since I will hold to the end of the day). In Column (D) I want to have the profit or loss. The problem is that the formula needs to be different depending if the opening transaction is Buy "B" or a "SS" Sell Short. So in other words I need a formula that says if in column (A) there is a "B", then take the closing price column (C) and minus the Fill price in column (B) to give the Profit or loss in Column (D). But at the same time or in the same formula cell if in column (A) there is "SS" then it needs to be reverse and take the fill price Column (B) and minus the Closing Price Column (C) to put the Profit or loss in Column D. Is there a formula I can put in the cells in column D that can do this? Any help is much apreciated.