Hi-
How can I combine 2 different If statements? If c2 is a sell i want the inverse calc (-).
![]()
=IF(C2="sell",-(L2/E2-1))
Thanks![]()
=IF(C2="buy",L2/E2-1)
Hi-
How can I combine 2 different If statements? If c2 is a sell i want the inverse calc (-).
![]()
=IF(C2="sell",-(L2/E2-1))
Thanks![]()
=IF(C2="buy",L2/E2-1)
Try:
Formula:
=IF(C2="buy",L2/E2-1, -(L2/E2-1))
if there can be only those two options (sell/buy)
Never use Merged Cells in Excel
you could do =IF(C2="sell",-(L2/E2-1),(L2/E2-1)) if sell and buy are your only two options.
Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
Sam Capricci
can you only have two values in c2 sell or buy
if so
=IF(C2="sell",-(L2/E2-1),L2/E2-1)
otherwise
=IF(C2="sell",-(L2/E2-1),IF(C2="buy",L2/E2-1, "what to do if C2 does not contain sell or buy"))
Wayne
if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here
If you have a solution to your thread - Please mark your thread solved do the following: >
Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.
I'm in a similar boat. I have very little excel experience. Basically, I have two columns on one sheet. I'm cataloging sales. Only 8 people will be buying. On another sheet, I have it set to say " =IF(Sheet1!H3:H104="Brian",100-Sheet1!I3,100) meaning that if the name appears in the cell to subtract the purchase price from their starting balance. However I can't find a way to use that name more than once without it subtracting ALL of the numbers from the field. I know this is confusing. Is there a way to post files here?
Formula bar
If(c2="sell", inverse formula, formula)
That sers the if its true statement for c2 = sell to the inverse formula and all oth to er c2 statements the normal
Another would be If(c2="sell", inverse formula, (if(c2="buy",formula,0))
That sets sell to the inverse buy to the normal and all else to 0
mstrchapl, you need to start your own post so you can receive solutions specific to your problem.![]()
Already did! Thank you sir!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks