Highlight empty cells
Table of Contents
1. Highlight empty cells
The image above shows a data set containing a few random blanks. A conditional formatting formula highlights the empty cells yellow.
Conditional formatting formula:
1.1 Explaining conditional formatting formula
Step 1 - Specify relative cell reference
The image above shows what the CF formula looks like in each cell, the actual cells do not contain this formula.
The cell range we want to highlight empty cells in is B3:F13 so the cell we must highlight first is the cell in the upper left corner in order to highlight the correct cells.
Cell B3 is a relative cell reference and changes in the cell range we want to format. If we started with B4 cell B3 will be highlighted if cell B4 is empty and we don't want that. We want to highlight the empty cell.
Step 2 - Create a logical expression
The equal sign is a logical operator and the result is a boolean value TRUE or FALSE.
B3=""
becomes
106=""
and returns FALSE. Cell B3 is not highlighted.
1.2 How to apply conditional formatting
The conditional formatting formula applied to cell range B3:F15 highlights all blank cells yellow. Here is how I did it:
- Select cell range B3:F13.
- Go to tab "Home" on the ribbon.
- Press with mouse on the "Conditional Formatting" button.
- Press with mouse on "New Rule..".
- Select "Use a formula to determine which cells to format".
- Type =B3="" in field "Format values where this formula is true:".
- Then press with left mouse button on "Format..." button.
- Go to tab "Fill".
- Pick a color.
- Press with left mouse button on OK button.
- Press with left mouse button on OK button to return to Excel.
1.3 Formulas returning nothing.
Note, a cell is conditionally formatted if it contains a formula that returns nothing "". The cell is not highlighted if the formula returns a value.
The image above demonstrates a formula in cell C13 that returns nothing "", the cell is highlighted. Cell C13 is selected and the formula is displayed in the formula bar.
1.4 Cells with hidden values
The image above shows an empty cell E3 but it is not highlighted, cell E3 is actually not empty, it is only formatted to hide values.
Go to the "Format Cells" dialog box to inspect cells that should have been highlighted. The dialog box above shows cell E3 with a custom cell formatting. ;;; hides all values in a cell, select category: General to show the value again.
2. Highlight error cells
The image above demonstrates a conditional formatting formula that highlights cells containing an error.
Conditional formatting formula:
2.1 Explaining formula
Step 1 - Specify cell reference
The conditional formatting formula is applied to cell range B3:F13, the cell reference must point to the upper left cell which is cell B3 in this example.
B3 returns 106.
Cell reference B3 is a relative cell reference, it changes accordingly when the parser goes to the next cell. It is possible to use absolute cell references, however, this will not work in this example.
Step 2 - Identify error value
The ISERROR function returns TRUE if the value is an error value.
ISERROR(value)
ISERROR(B3)
becomes
ISERROR(106)
and returns FALSE. Cell B3 is not highlighted.
Get Excel *.xlsx file
Recommended reading
Built-in conditional formatting
Data Bars Color scales IconsHighlight cells rule
Highlight cells containing stringHighlight a date occuring
Highlight cells equal to
Highlight unique/duplicates
Top bottom rules
Highlight top 10 valuesHighlight top 10 % values
Highlight above average values
Basic CF formulas
Working with Conditional Formatting formulasFind numbers in close proximity to a given number
Highlight empty cells
Highlight text values
Search using CF
Highlight records – multiple criteria [OR logic]Highlight records [AND logic]
Highlight records containing text strings (AND Logic)
Highlight lookup values
Unique distinct
How to highlight unique distinct valuesHighlight unique values and unique distinct values in a cell range
Highlight unique values in a filtered Excel table
Highlight unique distinct records
Duplicates
How to highlight duplicate valuesHighlight duplicates in two columns
Highlight duplicate values in a cell range
Highlight smallest duplicate number
Highlight more than once taken course in any given day
Highlight duplicates with same date, week or month
Highlight duplicate records
Highlight duplicate columns
Highlight duplicates in a filtered Excel Table
Compare
Highlight missing values between to columnsCompare two columns and highlight values in common
Compare two lists of data: Highlight common records
Compare tables: Highlight records not in both tables
How to highlight differences in price lists
Compare two columns and highlight differences
Min max
Highlight smallest duplicate numberHow to highlight MAX and MIN value based on month
Highlight closest number
Dates
Highlight dates in a date rangeHow to highlight MAX and MIN value based on month
Highlight odd/even months
Highlight overlapping date ranges using conditional formatting
Highlight records based on overlapping date ranges and a condition
Highlight date ranges overlapping selected record [VBA]
How to highlight weekends [Conditional Formatting]
How to highlight dates based on day of week
Highlight current date
Misc
Highlight every other rowDynamic formatting
How to change cell formatting using a Drop Down list
Highlight cells based on ranges
Highlight opposite numbers
Highlight cells based on coordinates
Excel categories
Leave a Reply
How to comment
How to add a formula to your comment
<code>Insert your formula here.</code>
Convert less than and larger than signs
Use html character entities instead of less than and larger than signs.
< becomes < and > becomes >
How to add VBA code to your comment
[vb 1="vbnet" language=","]
Put your VBA code here.
[/vb]
How to add a picture to your comment:
Upload picture to postimage.org or imgur
Paste image link to your comment.