I am trying to figure out how to subtract d1-B1 if cell is L but if cell is S then subtract B1-D1.
I would also like to add if number is negative to be in Red.
Thanks in advance!
I am trying to figure out how to subtract d1-B1 if cell is L but if cell is S then subtract B1-D1.
I would also like to add if number is negative to be in Red.
Thanks in advance!
Try this:
=IF(C1="L",D1-B1,IF(C1="S",B1-D1,""))
This returns a blank if C1 is neither "L" or "S".
You can use conditional formatting to change the font to red if the cell value is negative (or you can use Custom Formatting).
Hope this helps.
Pete
Thanks -I knew I was close!
If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.
Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).
Pete
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks