Reputation: 25
If I have a blank cell, I want to have another cell interpret that cell as blank and display "Not Graded" or "Graded" if it holds a value.
I have tried
=IF(ISBLANK(C21), "Not Graded", "Graded")
and
=IF(C21=""), "Not Graded, "Graded"))
However the cell that I'm evaluating APPEARS to be blank has a formula for an average in it, so Excel is returning ISBLANK as false, despite nothing showing within the cell to the user.
Is there a test where I can check for the contents of the cell rather than have Excel use formulas within that cell?
I've come across this: Return empty cell from formula in Excel
but am hoping to avoid VBA at this point if possible
Upvotes: 0
Views: 1969
Reputation: 2502
There are three main options for checking if a cell is truly blank, two of which you have already shown:
1. Empty String Equality
=IF(C21="","Not Graded", "Graded")
2. ISBLANK() Function
=IF(ISBLANK(C21), "Not Graded", "Graded")
3. Check the length of the cell value
=IF(LEN(C21)=0,"Not Graded", "Graded")
In all three cases, the value of the cell will be checked, not the formula. So if the value of the cell is anything other than blank, or error, all three formulas will produce a result of "GRADED". However, if the cell is in error, then formulas 1 and 3 will also produce an error, whereas formula 2 will show that the cell is not blank.
If your cell C21 contains an average function, it should either produce a number, or an error. In either case it will not be blank.
It appears that you want to check whether or not the cell is in Error, in which case you can simply use the ISERR()
or ISERROR()
functions depending on your needs per @ExcelHero 's answer.
Upvotes: 0
Reputation: 14764
I suspect the solution to your problem is that the cell that looks blank is not. It has text that is being forced to display as white.
You can write a formula that that detects the error condition for this cell that only looks blank, like so:
=IF(ISERR(C21),"Not Graded","Graded")
Upvotes: 1