# Excel formula required

I would like a formula to find which cell (A1 or A2) has a positive number

then deduct 2 from it and the balance is the resultant.

Known factors.

a1   =  5.00

a2  =  -10.00

The method I would use manually is to take the positive number (5.00 )

deduct 2 and the resultant is 3

another example

a1)  =  -10.00

a2)  =    8.00

8 minus 2 = resultant of 6

I am quite an amateur with Excel formulas but I think it may go something like this:

=If(A1>0,A1-2,0) OR IF(A2>0,A2-2,0)

Thanks if someone can assist

ian

By: Ian Bell

### One thought on “Excel formula required”

1. andrew walker Post author

Hi

You could try `=MAX(A1:B1)-2`

This formula will subtract 2 from the highest of the two numbers. Presuming that is one of the numbers will always be a positive. If you were to have two negative numbers and didn’t want the formula to calculate then enter this
`=IF(MAX(A1:B1)<0,"",MAX(A1:B1)-2)`
This will first check for a negative number as the highest number. If it finds one it will not display anything in the cell.

Does this help?