# Check cell value then subtract based on outcome

I have two columns - they look like the following:

``````YESNO  |  AMOUNT
________________
N      |  13
N      |  22
Y      |  13
``````

The AMOUNT column is a value output from a condition,

``````=IF(E16=1,"13",IF(E16=2,"22",IF(E16=3,"30")))
``````

I would like to SUBTRACT 3 from the AMOUNT column IF the YESNO column has a value of Y and I'm just not sure how to arrange this.

Any suggestions? What sort of function should I be looking at to make this happen?

## 1 Answer

Make a new column with the result of the new calculation, and use a simple IF command.

``````=IF(A2 = "Y",B2 - 3, B2)
`````` If you don't want to make a new column, just append `- IF(A2 = "Y", 3, 0)` to the end of your command.

``````=IF(E16=1,"13",IF(E16=2,"22",IF(E16=3,"30"))) - IF(A2 = "Y", 3, 0)
``````

You will of course have to replace `A2` with whatever your YESNO column is.

• Oh wow. Makes total sense (both suggestions). I'm partial to the second only because it doesn't require a new column. Works like a charm. And I've learnt something for the future. Thank you! – Wilhelm Warner Mar 5 '14 at 10:38