View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.newusers
George Gee
 
Posts: n/a
Default want to return "n/a" or "0"

One way:

=IF(OR(J5="",H5=""),"n/a",(J5/H5)-100%)

Hope this helps.

George Gee


"edrachel" wrote in
message ...

Hi, I am trying to do a formula that will either return a percentage or
if either of two cells are blank, then I want it to return either a "0"
or "n/a". Here is my formula =(J5/H5)-100% (this gives me the
recipacal of the percentage). It works fine. Now what do I add to get
it to return either "0" or "n/a" if either J5 or H5 is blank or both are
blank? Hope this makes sense. Background - I am trying to divide one
number by another to get the percentage of the difference 8/10-100%=20%
but if there are no numbers in the cells and nothing to divide, then I
want it to return "0" or "n/a".

Thanks.


--
edrachel
------------------------------------------------------------------------
edrachel's Profile:
http://www.excelforum.com/member.php...fo&userid=4736
View this thread: http://www.excelforum.com/showthread...hreadid=505888