# #DIV-0! error Help with IF forrmula

#### Scrumpywill

##### New Member
Hello, could someone please help where and how I would place the IF formula to remove the #DIV-0! error

im using =(O18-H18)/ABS(H18) but there is on value in cell H18 so it returning an error

Many Thanks Steve

#### SeanKC1989

##### New Member
Hi Steve,

eg =IF(H18<>"", (O18-H18)/ABS(H18), "")
Which in Lehmanns terms means if H18 is not blank then return the value and if it is then remain blank

Let me know if that helps

##### MrExcel MVP
=IF(ISNUMBER(1/H18),(O18-H18)/ABS(H18),"")

You can still run into trouble if O18 is text, i.e. not number or empty.

#### Scrumpywill

##### New Member
thanks for the reply - sorry buddy its still got the error I used this with and without the \$

=IF(\$H10<>"",(O10-H10)/ABS(H10),"")

#### Scrumpywill

##### New Member
Happy Days fella this worked a treat -- mega thanks, great

super work - love it

#### SeanKC1989

##### New Member
Can you show me the spreadsheet?
Also is the ABS function required?? Is it possible for the number to be less than 0?? If the answer is no then the ABS function is not required.
If it can be negative then try this =IF(H10>0, (O10-H10)/H10), "")

Otherwise copy and paste this formula =IF(H10<>"", O10-H10/(H10), "")

#### Scrumpywill

##### MrExcel MVP
Happy Days fella this worked a treat -- mega thanks, great

super work - love it
You are welcome.

#### Scrumpywill

##### New Member
can I attach a spreadsheet ?