#1
|
|||
|
|||
How to prevent #DIV/0!
I am wondering how to insert a formula into a cell which will display a blank result when the values in the cells being accessed are blank.
For example I have formula of =F4/C4*100 which displays #DIV/0! when (cells) F4 and or C4 are blank. Thanks |
#2
|
||||
|
||||
Try:
=IF(C4=0,"",F4/C4*100)
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thanks
If should have known better. I used to be an analyst/programmer and forgot about logical functions. I note that the function VAL is not in Excel. When a cell is blank and the cell is formatted as a number (this occurs when you initially format it as a number) how can you test if the cell contains nothing (ie blank) rather than containing the value zero - actually can you test if the cell is blank OR zero? |
#4
|
|||
|
|||
This will do that
=IF(ISBLANK(A1),"It's Blank","It's Not Blank") |
#5
|
|||
|
|||
Try...
=IF(N(C4),F4/C4*100,"") |
#6
|
|||
|
|||
Lovely!
Works just the way I prefer. If the input cells contain nothing (clear), or a space or zero (0) then it returns a blank (ie clear) I have not seen that logical operator before ie N() Please explain. Thanks again John |
#7
|
|||
|
|||
Hi John,
Glad you have something to work with and you're welcome. Maybe this will help http://www.excelfunctions.net/Excel-N-Function.html |
#8
|
|||
|
|||
Thanks heaps.
|
#9
|
|||
|
|||
What about
=iferror(F4/C4*100,0) ? |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
prevent repetition in form | johnbest | Word VBA | 2 | 03-31-2015 11:42 PM |
Prevent Copying and Pasting | Jimmy Tsawo | Excel | 3 | 02-20-2014 03:54 AM |
How can I PREVENT headings I don't want? | peytontodd | Word | 3 | 11-23-2013 05:08 PM |
Prevent Overlap of Appointments | irab88 | Outlook | 0 | 08-03-2010 10:43 AM |
text box, prevent from printing | Tanya | Word | 0 | 02-05-2010 06:57 AM |