Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.newusers
|
|||
|
|||
want to return "n/a" or "0"
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 |
#2
Posted to microsoft.public.excel.newusers
|
|||
|
|||
want to return "n/a" or "0"
=IF(OR(H5="",J5=""),"N/A",(J5/H5)-100%) Hope it helps -- goober ------------------------------------------------------------------------ goober's Profile: http://www.excelforum.com/member.php...o&userid=19838 View this thread: http://www.excelforum.com/showthread...hreadid=505888 |
#3
Posted to microsoft.public.excel.newusers
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Return SEARCHED Column Number of Numeric Label and Value | Excel Worksheet Functions | |||
Count Intervals of 1 Numeric value in a Row and Return Count down Column | Excel Worksheet Functions | |||
Huge problem with "if" formula's | Excel Discussion (Misc queries) | |||
How do create a formula to evalute a # to return 1 of 4 conditions | Excel Worksheet Functions | |||
if the value of a cell in a range is not blank, then return the v. | Excel Worksheet Functions |