Reputation: 225
Right now I'm trying to figure out whether a cell contains one of two values, it will then perform an operation which depends on whatever value is in said cell. This is the function I have so far:
=IF(ISNUMBER(SEARCH("btc", I2)), (E2*(1+10%)-D2),""), IF((ISNUMBER(SEARCH("pp",I2)),E2-D2,""))
However I found that you cannot do 2 if statements in the same cell.
Upvotes: 19
Views: 90939
Reputation:
Alternate with nested IFERROR functions.
=IFERROR(E2*IFERROR(SIGN(SEARCH("btc",I2))*110%,SIGN(SEARCH("pp",I2)))-D2,"")
Upvotes: 5
Reputation: 152450
Put your second in the false of the first instead of the ""
. It is called nesting:
=IF(ISNUMBER(SEARCH("btc", I2)), (E2*(1+10%)-D2),IF(ISNUMBER(SEARCH("pp",I2)),E2-D2,""))
Upvotes: 31