Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If I have 8 in A1 and 2 in A2 I get 25%.
But if I have 8 in A1 and 0 in A2 I get #DIV/0!. When I want to get 0 or 0%. Simple remedy? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Use a formula like
=IF(A2=0,0,A1/A2) "TomRW" wrote in message ... If I have 8 in A1 and 2 in A2 I get 25%. But if I have 8 in A1 and 0 in A2 I get #DIV/0!. When I want to get 0 or 0%. Simple remedy? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
=IF(A2 = 0, 0, A1/A2)
-- HTH, George "TomRW" wrote in message ... If I have 8 in A1 and 2 in A2 I get 25%. But if I have 8 in A1 and 0 in A2 I get #DIV/0!. When I want to get 0 or 0%. Simple remedy? |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I'm intrigued as to what formula you are using that gives those results? If
you've got 8 in A1 and 2 in A2, then the most obvious formula to give 25% would be =A2/A1, but if that is the formula you wouldn't get a #DIV/0! when A2 is 0. If you are trying to protect against A1 (rather than A2) being zero, then you could use =IF(A1=0,0,A2/A1), but be careful if you use that formula, as you wouldn't see the difference in result between A1 being zero and A2 being zero. As you reduce the value of A1, the result of the division increases, but you have asked for it to reduce again when you get to A1 being zero; the result of the division should be infinite, not zero, so make sure that you don't confuse yourself. -- David Biddulph "TomRW" wrote in message ... If I have 8 in A1 and 2 in A2 I get 25%. But if I have 8 in A1 and 0 in A2 I get #DIV/0!. When I want to get 0 or 0%. Simple remedy? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Dividing name | Excel Worksheet Functions | |||
Dividing up cells | Excel Discussion (Misc queries) | |||
Dividing by zero | Excel Discussion (Misc queries) | |||
dividing columns by 100 | Excel Discussion (Misc queries) | |||
dividing a row | Excel Worksheet Functions |