Finding empty cells excel

See all How-To Articles

In this tutorial, you will learn how to find blank cells in Excel and Google Sheets.

find blank cells 7

Find & Select Empty Cells

There is an easy way to select all the blank cells in any selected range in Excel. Although this method won’t show you the number of blank cells, it will highlight all of them so you can easily locate them in a spreadsheet.

1. First, select the entire data range. Then in the Ribbon, go to Home > Find & Select > Go To Special.

find blank cells 2

2. In Go To Special dialog window click on Blanks and when done press OK.

find blank cells 3

As a result, all blank cells are selected.

find blank cells 4

With this method, you won’t find pseudo-blank cells (cells with formulas that return blanks and cells containing only spaces).

Other ways to identify blanks:

  • IsEmpty Function in VBA
  • How to use the ISBLANK Function

Find Blank Cells in Google Sheets

Unlike Excel, Google Sheets doesn’t have a Go To Special feature. But you can identify blank cells and select them one-by-one, highlight them, or replace them.

Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel 2021 Excel 2021 for Mac Excel 2019 Excel 2019 for Mac Excel 2016 Excel 2016 for Mac Excel 2013 Excel 2010 Excel 2007 Excel for Mac 2011 More…Less

Sometimes you need to check if a cell is blank, generally because you might not want a formula to display a result without input.

Formula in cell E2 is =IF(D2=1,"Yes",IF(D2=2,"No","Maybe"))

In this case we’re using IF with the ISBLANK function:

  • =IF(ISBLANK(D2),»Blank»,»Not Blank»)

Which says IF(D2 is blank, then return «Blank», otherwise return «Not Blank»). You could just as easily use your own formula for the «Not Blank» condition as well. In the next example we’re using «» instead of ISBLANK. The «» essentially means «nothing».

Checking if a cell is blank - Formula in cell E2 is =IF(ISBLANK(D2),"Blank","Not Blank")

=IF(D3=»»,»Blank»,»Not Blank»)

This formula says IF(D3 is nothing, then return «Blank», otherwise «Not Blank»). Here is an example of a very common method of using «» to prevent a formula from calculating if a dependent cell is blank:

  • =IF(D3=»»,»»,YourFormula())

    IF(D3 is nothing, then return nothing, otherwise calculate your formula).

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

In Excel, a blank cell doesn’t always mean a cell with an empty string («»). An example to this is invisible characters like a new line character which can be entered by pressing the Alt + Enter key combination when you’re in a cell. You can detect the cells that are actually blank by using Excel’s Go To feature. In this article, we’re going to show you how to find blank cells in Excel using the Go To feature.

find blank cells in Excel

How to Find Blank Cells in Excel using Go To

  1. Begin by selecting your data including the blank rows
  2. Open the Go To Special dialog by following HOME > Find & Select > Go To Special in the ribbon
  3. Select the Blanks option
  4. Click OK to apply your selection

In our example, you can see that Excel selects only two cells, D6 and C7, even though the cells F6 and F7 look empty as well. This is not an error, but an example of «actually not blank cells». The cells like F6 and F7 will also affect results of the COUNTA function, which also counts these types of cells. For example, the =COUNTA(B3:F8) formula returns 28 as it ignores only cells D6 and C7.

You might want to be extra careful when removing blank rows using the Go To feature, because it selects individual blank cells in rows that have values. Removing them will cause data loss, even though you can revert your actions with Undo.

Some blank cells in a worksheet are actually not empty. But their existence will make you confused. Therefore, you need to find those non-empty cells in your Excel worksheet.

There are many conditions that a cell will be non-empty while the content in it is invisible. For example, a formula will return null value, the font color in the cell is the same as the fill color, or the invisible values that returned by VBA macros. All those reasons can make the content invisible. But actually those cells are non-empty. And to avoid the problems caused by those cells in your work, you can use the following 4 methods to find those cells that contain invisible contents.

Method 1: Use Ctrl and Arrows Keys

In this method, you need to use the Ctrl and Arrows keys in the keyboard. And below we will demonstrate the thorough step.

In the image below, there is a blank row in the range.An Example for Non-Empty Cells

And before deleting the row, you need to make sure that there are no contents in the row. Otherwise some errors will appear and can result in mistakes in other cells.

  1. Click the cell A1 in the worksheet.
  2. And then press the shortcut keys “Ctrl + ↓” on the keyboard. When you use this shortcut keys combo, the cursor will move to the last non-empty cell in the column.Move

And in this example, it will move to cell A7. When you press the keys again, the cursor will move to the first non-empty cell in the next range. And in this example, it will move to cell A9. This means that cell A8 is really an empty cell.

  1. Now you need to check the second column. Here click the cell B1.
  2. And then press the shortcut keys “Ctrl + ↓” again.
  3. After that, see where the cursor position at.Move Again

This time, the cursor move to cell B14 directly. This means that cell B8 is a non-empty cell.

  1. Now click the cell B8 and check the value in it. In the formula bar, you can see that there is a formula in the cell.Formula

Here because the font color of the cell is white, so you cannot see it.

  1. Now continue using the shortcut keys and check the next column.

When you need to check many cells in a range, clicking those cells one after another and check in the formula bar can be time-consuming. Therefore, you can use this method. Besides, you can also combine other arrow keys with the Ctrl key to check other rows or columns.

Method 2: Use ISBLANK Function

Instead of using shortcut keys, you can also use the ISBLANK function in your worksheet.

  1. Click a blank cell in the worksheet. In this example, we click cell D8.
  2. And then input the formula into the cell.

=ISBLANK(A8)

  1. Next press the button “Enter” on the keyboard. Thus, you will get a result in this cell.Function

Here the formula returns a result “TRUE” in the cell.

  1. Now click the fill handle of the cell and drag rightward to fill other cells.Fill Handle

And then you will see all the result for the three cells. You can see that the result in cell E8 is “FALSE”, which means that cell B8 is a non-empty cell.Result

You can see that using this function is very easy. When you need to check for a whole column or a whole row, you can use this method quickly.

Method 3: Use Conditional Formatting

In this method, you can also use conditional formatting to highlight certain cells. Here you can highlight the empty cells in a range.

  1. Select the target range that contains all the target cells.
  2. And then click the button “Conditional Formatting”.
  3. After that, in the drop-down menu, choose the option “New Rule”.New Rule
  4. In the “New Formatting Rule” window, choose the last option that needs to use formula.
  5. Now input the formula into the text box:

=ISBLANK(A1)

Here you will also use the ISBLANK function. Here make sure that the cell is the first cell in the range. On the other hand, if you need to highlight non-empty cells in a range, you can input this formula:

=NOT(ISBLANK(A6))

  1. And then click the button “Format”.Formatting Rule
  2. In the “Format Cells” window, set a format for the cell.
  3. When you have finished the setting, click the button “OK”.Format Cells
  4. Next click “OK” in the “New Formatting Rule” window.Click OK

And then you can see that in the range, true empty cells will be highlighted.Highlight Cells

Hence you can know that the cell B8 contains a value. Using conditional formatting can also help you judge those cells quickly.

Method 4: Use VBA Macro

This is the last method and you will use the VBA macros.

  1. Press the shortcut keys “Alt +F11” on the keyboard to open the VBA editor.
  2. And then click the button “Insert” in the toolbar.
  3. After that, choose the option “Module” in the sub menu. Thus, you have inserted a new module into the file.Insert Module
  4. Now copy and paste the following codes into the module.

Sub findcell()

    Dim cel As Range

    For Each cel In Range(“A1:C14”)

        If IsEmpty(cel) = True Then

            cel.Interior.Color = vbYellow

        End If

    Next cel

End Sub

Here we will also find the empty cells and format them. If you need to format cells that contain contents, you can also modify the codes according to your need. You may also pay attention that you need to clear all the conditional formatting. Otherwise the format of VBA macro will be covered by the format of conditional formatting. And this will cause trouble to you.

  1. Now click the button “Run Sub” in the toolbar or press the button “F5” on the keyboard to run this macro.
  2. After that, come back to the worksheet. And you will see the result like the image below shows.Result

The formats of real empty cells change. Therefore, cell B8 is a non-empty cell in this range.

A Comparison between the Methods

Here we have listed the advantages and disadvantages of the above four methods.

Comparison

Ctrl and Arrows Keys ISBLANK Function Conditional Formatting

VBA Macro

Advantages

You can apply this method quickly when you need to find non-empty cells in a row or a column. When you need to judge cells in a range, this function is very helpful. All the result can be listed clearly in the worksheet. And you can choose to format empty cells or non-empty cells according to your need. With just one click, you can easily get the result. Besides, you can also modify the codes according to your need.

Disadvantages

Compared with other methods, this method will be time-consuming. If the non-empty cells are separate in different position, it will be inconvenient to use this formula. The format of conditional formatting will interfere with other cell formats. If you are not familiar with Excel VBA, the task will be more complicated.

From the above analysis, you will have a comprehensive understanding of the four methods. And you can choose the most suitable method according to your need.

Protect Your Excel Files

The safety of mission-critical Excel files in your storage devices is very essential. Therefore, you need to carefully protect your Excel files. The Excel files have long been victim to malicious virus and malware. Whenever you find Excel corruption in your computer, you need to take the right actions. And you can also use a recovery tool to repair Excel file. In all the methods that can deal with Excel errors, using a tool is the most cost-effective method.

Author Introduction:

Anna Ma is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including repair docx data problem and outlook repair software products. For more information visit www.datanumen.com

Author: Oscar Cronquist Article last updated on February 02, 2023

This article demonstrates how to find empty cells and populate them automatically with a formula that adds numbers above and returns a total.

Is it possible to quickly select all empty cells and then sum cells above to the next empty cell? Yes, I will show you how.

Can I have a formula in grand total (row 18) that only sums all the totals above? Yes!

What’s on this page

  1. How to select empty cells in a cell range
  2. Populate empty cells with a formula
  3. Add grand totals that only sums cells populated with formulas — Excel 2013
    1. Explaining formula
  4. Add grand totals that only sums cells populated with formulas — SUMIF function
  5. Add grand totals that only sums cells populated with formulas — Excel 365
    1. Explaining formula
  6. Get Excel *.xlsx file

1. How to select empty cells in a cell range

The image above demonstrates how to find empty cells in a given cell range.

  1. Select all values and the blank total cells.
  2. Press F5, a dialog box appears.
  3. Press the left mouse on the «Special…» button.
  4. Press on «Blanks» to select it, then press on the «OK» button.

Back to top

2. Populate empty cells with a formula

  1. Go to tab «Home» on the ribbon and press with left mouse button on the «AutoSum» button.
  2. All empty cells now have a SUM formula that adds all the above values to the next SUM formula.

3. Add grand totals that only sums cells populated with formulas

  1. Select cell C18 and type this formula:

    =SUMPRODUCT(ISFORMULA(C3:C17)*C3:C17)

  2. Press Enter. Copy cell C18 and paste to cell range D18:F18.

3.1 Explaining formula in cell C18

Step 1 — Check if cell contains a formula

The ISFORMULA function checks if a cell in cell range C3:C17 has a formula. It returns TRUE or FALSE.

ISFORMULA(C3:C17)

returns this array:

{FALSE; FALSE; TRUE; FALSE; FALSE; FALSE; TRUE; FALSE; FALSE; TRUE; FALSE; FALSE; FALSE; FALSE; TRUE}

The picture below shows this array in column D.

The array shows that there is a formula in C5, C9, C12, and C17.

Step 2 —  Multiply with value

The asterisk character allows you to multiply numbers and boolean values.

ISFORMULA(C3:C17)*C3:C17 multiplies the boolean values with their corresponding values in column C, shown in column E below.

ISFORMULA(C3:C17)*C3:C17

becomes

{FALSE; FALSE; TRUE; FALSE; FALSE; FALSE; TRUE; FALSE; FALSE; TRUE; FALSE; FALSE; FALSE; FALSE; TRUE}*C3:C17

becomes

{FALSE; FALSE; TRUE; FALSE; FALSE; FALSE; TRUE; FALSE; FALSE; TRUE; FALSE; FALSE; FALSE; FALSE; TRUE}*{748; 508; 1256; 283; 960; 23; 1266; 821; 658; 1479; 970; 109; 599; 252; 1930}

and returns

{0; 0; 1256; 0; 0; 0; 1266; 0; 0; 1479; 0; 0; 0; 0; 1930}

Step 3 — Add values and return the total

The SUMPRODUCT function then sums all values in the array.

SUMPRODUCT(ISFORMULA(C3:C17)*C3:C17)

becomes

SUMPRODUCT({0; 0; 1256; 0; 0; 0; 1266; 0; 0; 1479; 0; 0; 0; 0; 1930})

and returns 5931 in cell C18.

Why not use the SUM function? You need to enter it as an array formula if you use the SUM function. Use the SUM function if you are an Excel 365 user.

Back to top

4. Add grand totals that only sums cells populated with formulas — Excel 2013

The following formula won’t work, the SUMIF function seems to not be capable of processing the ISFORMULA function. The ISFORMULA function is an Excel 2013 function, they seem incompatible.

=SUMIF(C3:C17, ISFORMULA(C3:C17))

Let me know if you have a solution that allows me to use the SUMIF function.

5. Add grand totals that only sums cells populated with formulas — Excel 365

=SUM(FILTER(C3:C17, ISFORMULA(C3:C17)))

5.1 Explaining formula

Step 1 — Check if cell contains formula

The ISFORMULA function returns a boolean value TRUE or FALSE if a cell contains a formula or not.

ISFORMULA(C3:C17)

Step 2 — Filter numbers based on boolean values

FILTER(C3:C17,ISFORMULA(C3:C17))

Step 3 — Add numbers and return a total

SUM(FILTER(C3:C17,ISFORMULA(C3:C17)))

test

test

test

Running totals based on criteria
Andrew asks: LOVE this example, my issue/need is, I need to add the results. So instead of States and Names, […]

test

Sum unique numbers
Table of Contents Sum unique numbers Get Excel *.xlsx file Sum unique distinct numbers Get Excel *.xlsx file Sum number […]

test

Sum cells based on criteria
Katie asks: I have 57 sheets many of which are linked together by formulas, I need to get numbers from […]

test

Sum based on OR – AND logic
Question: It’s easy to sum a list by multiple criteria, you just use array formula a la: =SUM((column_plane=TRUE)*(column_countries=»USA»)*(column_producer=»Boeing»)*(column_to_sum)) But all […]

test

test

Sum unique distinct numbers
The image above shows numbers in column B, some of these numbers are duplicates. The formula in D12 adds unique […]

test

Sum by group
To extract groups from cell range B3:B10 I use the following regular formula in cell B13.

test

Sum numbers between two dates
The formula in cell C15 uses two dates two to filter and then sum values in column C, the SUMIFS […]

test

How to create running totals
This article demonstrates a formula that calculates a running total. A running total is a sum that adds new numbers […]

test

Sum only visible cells
The SUBTOTAL function lets you sum values in a cell range that have some rows hidden or filtered, the picture […]

test

How to sum a cell range
I will in this article demonstrate different ways to sum values, the first method is so easy and fast it’s […]

test

Excel formula not working
This article explains why your formula is not working properly, there are usually four different things that can go wrong. […]

Latest updated articles.

More than 300 Excel functions with detailed information including syntax, arguments, return values, and examples for most of the functions used in Excel formulas.

More than 1300 formulas organized in subcategories.

Excel Tables simplifies your work with data, adding or removing data, filtering, totals, sorting, enhance readability using cell formatting, cell references, formulas, and more.

Allows you to filter data based on selected value , a given text, or other criteria. It also lets you filter existing data or move filtered values to a new location.

Lets you control what a user can type into a cell. It allows you to specifiy conditions and show a custom message if entered data is not valid.

Lets the user work more efficiently by showing a list that the user can select a value from. This lets you control what is shown in the list and is faster than typing into a cell.

Lets you name one or more cells, this makes it easier to find cells using the Name box, read and understand formulas containing names instead of cell references.

The Excel Solver is a free add-in that uses objective cells, constraints based on formulas on a worksheet to perform what-if analysis and other decision problems like permutations and combinations.

An Excel feature that lets you visualize data in a graph.

Format cells or cell values based a condition or criteria, there a multiple built-in Conditional Formatting tools you can use or use a custom-made conditional formatting formula.

Lets you quickly summarize vast amounts of data in a very user-friendly way. This powerful Excel feature lets you then analyze, organize and categorize important data efficiently.

VBA stands for Visual Basic for Applications and is a computer programming language developed by Microsoft, it allows you to automate time-consuming tasks and create custom functions.

A program or subroutine built in VBA that anyone can create. Use the macro-recorder to quickly create your own VBA macros.

UDF stands for User Defined Functions and is custom built functions anyone can create.

A list of all published articles.

I need vba code for excel. I’m checking whether A1, B7, C9 are empty onclick.

If they are empty (any or all of the variables is/are empty), I need to return:
» is so so so cell is empty click ok to fill it»

If none of the cells is empty, or if all of them are not empty, or they contain any value, I need to return:
«Do my stuff»

There is a link to a particular workbook, but I wanted to check here also.

Aaron Thomas's user avatar

Aaron Thomas

4,9548 gold badges43 silver badges87 bronze badges

asked Oct 11, 2013 at 18:56

user2872175's user avatar

1

Sub tgr()

    Dim CheckCell As Range

    For Each CheckCell In Sheets("Sheet1").Range("A1,B7,C9").Cells
        If Len(Trim(CheckCell.Value)) = 0 Then
            CheckCell.Select
            MsgBox "Cell " & CheckCell.Address(0, 0) & " is empty. Click OK and populate it.", , "Missing Information"
            Exit Sub
        End If
    Next CheckCell

    'All cells filled, code to Do My Stuff goes here
    MsgBox "Do my stuff", , "Continue macro"

End Sub

answered Oct 11, 2013 at 19:59

tigeravatar's user avatar

tigeravatartigeravatar

26.1k5 gold badges28 silver badges38 bronze badges

If you care if the cell is truly empty, you need to use the IsEmpty function on the Value property. This will return false for cells with single apostrophes or functions that return an empty string.

Public Function CellsAreEmpty(ParamArray aCells() As Variant) As Boolean

    Dim vItm As Variant
    Dim bReturn As Boolean

    bReturn = True

    For Each vItm In aCells
        bReturn = bReturn And IsEmpty(vItm.Value)
    Next vItm

    CellsAreEmpty = bReturn

End Function


Sub TestCells()

    If CellsAreEmpty(Range("A1"), Range("B7"), Range("C9")) Then
        Debug.Print "Do stuff"
    Else
        Debug.Print " is so so so cell is empty click ok to fill it"
    End If

End Sub

answered Oct 11, 2013 at 20:27

Dick Kusleika's user avatar

Dick KusleikaDick Kusleika

32.5k4 gold badges51 silver badges73 bronze badges

Is it what you are looking for ?

Below code will check for sheet1- Range A1, B7, c9 .

Sub checkEmptyCells()

    With ThisWorkbook.Sheets("sheet1")
        If (Len(.Range("A1")) = 0) Then
            MsgBox "Cell A1 is empty. Click ok to fill"
            Exit Sub
        ElseIf (Len(.Range("B7")) = 0) Then
            MsgBox "Cell B7 is empty. Click ok to fill"
            Exit Sub
        ElseIf (Len(.Range("C9")) = 0) Then
            MsgBox "Cell C9 is empty. Click ok to fill"
            Exit Sub
        Else
            MsgBox "Do my stuff"
            Exit Sub
        End If

    End With

End Sub

answered Oct 11, 2013 at 19:23

Santosh's user avatar

SantoshSantosh

12.1k4 gold badges41 silver badges72 bronze badges

1

If you prefer using non vba solution then you can conditional formatting.
It wont give a message box but would highlight the cells when they are blank.

To use conditional formatting follow the below steps

  • Select the cells
  • Under Home Tab > Sytles > Conditional formatting
  • Conditional formatting dialog box will appear. Click on New Rule button.
  • Select use a formula to determine which cells to format.
  • Enter the formula (if cell A1 is selected then A1=»»)
  • Click on Format > Goto Fill and select the color you want.

enter image description here

answered Oct 11, 2013 at 20:47

Santosh's user avatar

SantoshSantosh

12.1k4 gold badges41 silver badges72 bronze badges

True story:

On Friday (17th April – 2015), I flew from Vizag (my town) to Hyderabad so that I can catch a flight to San Francisco to attend a conference. As I had 10 hours of overlay between the flights in Hyderabad, I checked in to a lounge area so that I can watch some sports, eat food while pretending to do work on my laptop. There was a gentleman sitting in adjacent space doing some work in Excel. As I began to compose few emails, the gentleman in next sitting space asked me what I do for living. Our conversation went like this.

Me: I run a software company
He: Oh, so you must be good with computers
Me: smiles and cringes at the stereotyping
He: What is the formula to select all the blank cells in my Excel data and highlight them in Yellow color

Mind you, he had no idea that I work in Excel. We were 2 random guys in airport lounge watching sports and eating miserable food.

Me: Well, what are you trying to do?
He: You see, I am auditing this data. I need to locate all the blank rows and set them in different color so that my staff can fill up missing information. Right now, I am selecting one row at a time and filling the colors. Is there a one step solution to this problem?

Needless to say, I showed him how to do it faster, which led to an interesting 3 hours at the lounge.

End of true story.

So today, let’s understand how to find & highlight all the blank cells in the data.

Let’s take a look at the data:

Here is a sample of data.

find-highlight-blank-cells-in-excel

One important thing to keep in mind:

  • This data is not structured as table.

There are 3 powerful & simple methods to find & highlight blank cells.

Method 1: Selection & Highlight approach

In this method, we just select all the blank cells in one go and fill them with yellow color.

First select the entire range of cells where you data is located. Using CTRL+Arrow keys is not going to work because of the blank cells in-between. Instead, follow this:

  1. Select the top-left cell of your data (say B2)
  2. Click and drag the little rectangular box in vertical-scrollbar all the way down.
  3. Hold Shift and click on the very last cell (bottom-right)

Now that all the data is selected,

  1. Press F5 and click on Special
  2. Choose blanks. Click ok.
  3. This will select only the blank cells.
  4. Fill yellow (or other) color by clicking the fill icon and selecting the color
  5. Done!

Here is a quick demo of this:

Method 2: Filter approach

The above approach (selection & highlight) works fine if you care about blank cells anywhere. What if you just want to find & highlight only rows have blanks in a certain column. Say, you want to highlight all rows where comments are empty.

In this case,

  1. Select all data using the steps in method 1.
  2. Press CTRL+Shift+L to activate filters
  3. Keep the selection on & Filter the column you want to show only blank values
  4. Now fill yellow color
  5. Done!

Method 3: Conditional formatting approach

Both method 1 & method 2 have a draw back. If your data changes, you must clean up & highlight again.

This is where conditional formatting shines. You can tell Excel to highlight cells only if they are blank. Once some data is typed in (or copy pasted or connection refreshed), the color will go away automatically.

To set up conditional formatting,

  1. Select all the data
  2. Go to Home > Conditional Formatting > New rule
  3. Click on “Format only cells that contain”
  4. Change “Cell Value” option to “Blanks”
  5. Set up formatting you want by clicking on Formatting button
  6. Click ok and you are done!

highlight-blanks-conditional-formatting

This will automatically highlight all blank cells in your favorite color.

Oh wait, what if I want to highlight entire row if a certain column is blank?

You can use conditional formatting in such cases too. Follow these steps.

Assuming you want to check for blanks in Column G and your first data point is in G4.

  1. Select all the data (just data, no headers)
  2. Go to Home > Conditional Formatting > New rule
  3. Select rule type as “Use a formula…”
  4. Type the formula as =LEN($G4)=0
  5. Set up formatting you want
  6. Click ok and you are done.

highlight-blanks-conditional-formatting-2

Wait a sec, What is the LEN($G4)=0 thing?

LEN() formula tells us what is the length of a cell’s content. So if a cell is blank, LEN(cell) would be 0.

$G4 is a mixed reference style. This way, even when conditional formatting is checking other columns, it still looks in column G to see if that is really empty.

Related: An introduction to Excel cell references.

Bonus tips:

Q) How to highlight if either of column G or H are blank?
A) =OR(LEN($G4)=0, LEN($H4)=0)

Q) How to highlight if both column G & H are blank?
A) =AND(LEN($G4)=0, LEN($H4)=0)

Go ahead and whack them blank cells.

How do you deal with blank cells?

Do you sneak up on an unsuspecting fellow passenger in an airport lounge and ask them how to deal with the blank problem? Do you manually select the blank cells and deal with them one at a time? Or do you use some ninja level trickery to fix the blanks?

Go ahead and tell me your blank story in the comments.

Fill the blanks in your Excel knowledge

If you have gaps in your Excel know-how, then you have come to right place. Use below links and fill those blanks.

  • Delete blank rows in Excel
  • Introduction to Excel conditional formatting – video
  • Excel basics
  • Advanced Excel concepts & techniques


Share this tip with your colleagues

Excel and Power BI tips - Chandoo.org Newsletter

Get FREE Excel + Power BI Tips

Simple, fun and useful emails, once per week.

Learn & be awesome.




  • 27 Comments




  • Ask a question or say something…




  • Tagged under

    blank cells, blank rows, Excel 101, len(), Microsoft Excel Conditional Formatting, Microsoft Excel Formulas, quick tip, screencasts, videos




  • Category:

    Excel Howtos

Welcome to Chandoo.org

Thank you so much for visiting. My aim is to make you awesome in Excel & Power BI. I do this by sharing videos, tips, examples and downloads on this website. There are more than 1,000 pages with all things Excel, Power BI, Dashboards & VBA here. Go ahead and spend few minutes to be AWESOME.

Read my story • FREE Excel tips book

Advanced Excel & Dashboards training - Excel School is here

Excel School made me great at work.

5/5

Excel formula list - 100+ examples and howto guide for you

From simple to complex, there is a formula for every occasion. Check out the list now.

Calendars, invoices, trackers and much more. All free, fun and fantastic.

Advanced Pivot Table tricks

Power Query, Data model, DAX, Filters, Slicers, Conditional formats and beautiful charts. It’s all here.

Still on fence about Power BI? In this getting started guide, learn what is Power BI, how to get it and how to create your first report from scratch.

A smart technique to simplify lengthy nested IF formulas in Excel

  • Excel for beginners
  • Advanced Excel Skills
  • Excel Dashboards
  • Complete guide to Pivot Tables
  • Top 10 Excel Formulas
  • Excel Shortcuts
  • #Awesome Budget vs. Actual Chart
  • 40+ VBA Examples

Related Tips

27 Responses to “Find and Highlight all blank cells in your data [Excel tips]”

  1. Heather says:

    I use conditional formatting — generally when I’m sending messages out to the sales team to fill in the blanks on their forms.
    Often I use a double-highlight option.
    Highlighting the entire row where a blank appears in a light color — but using a bolder color to also highlight the specific cell.

    On a few forms where I have to be very specific about changes made, I also do a reverse of this on my copy of the form — create a duplicate copy of the worksheet, and format my original worksheet to highlight when the data does not match the copy.

    But, I’m ashamed to say — I still use my old version of looking for blanks in the conditional formatting =A5=»»
    I need to remember that ‘blank’ is part of the Contains rule types.

    • Good tip about double-highlighting. Thanks.

  2. Since a lot of my data comes from sources that may include spaces instead of blanks as well as unprintable characters, I use Trim(Clean()) to include these. So, instead of selecting for Blanks in the Conditional Formatting example my formula looks like «=Len(Trim(Clean(A1)))» after select the whole area with data.

    When the users type/paste in the real values that replaces what is there.

  3. Gary Lundblad says:

    So I wanted to try the trick to highlight an entire row if a certain column is blank, but it didn’t quite work as expected. My data was in A2:I6, as I inadvertently overlooked the fact that for the example to work my data needed to begin in G4. The result I got didn’t make any sense at all. It highlighted some rows that had blanks in various cells, and one row that didn’t have any blanks at all. Can someone explain what happened? Why does the cell reference in the formula need to be the first data point?

    Thank you!

    • Gary

      From what I see you’ve tried to start in the middle of the range, which makes to sense to me. Let me see if I can interpret what I see to what you may want.

      The range you are trying to Conditionally Format is $A$2:$I$6. The formula to be tested is =Len($G2)=0.

      Once applied, Excel uses the Absolute and Relative Addresses to establish the rule for each cell relative to the upper left «anchoring» cell. So if I «slide across» row 2, the formula continues to look at G2, but when we slide down to row 3, it now looks that G3.

      Likewise, you could write «=$G2=$G1», to look for consecutive duplicate values.

      It being baseball season, if I wanted to look across all of the innings played by a team, side by side, for any where at least one team scored and both teams scored the same number of runs, by highlighting the two very long rows for a (about 1500 columns), the formula would be «=AND(A$2+A$3 > 0,A$2=A$3)»: The columns «slide» while the rows stay steady.

  4. Derk says:

    Gary,

    If a formula contains a relative reference it will be interpreted with respect to the active cell. Usually you will want to use the active cell as the reference in your formula.

  5. Diana says:

    I too use Heather’s method, so thanks for the tips. It’s nice to find easier ways to accomplish this. Too often we do what we know, even if it’s not the best method. Years ago I used to tell my students there are always 1+ ways to do something in a MS product — but you have to remember 1 or who cares how many there are.

    PS — Fire your travel agent! Ten hour layover?! Yuck! 🙂

  6. orkun says:

    hi chandoo,

    asume that you have a data table inc. numbers only. every month I add new rows to this table and sent to my collugue. and sometimes I need to change some figures that are already entered previous weeks. to take his notice, I change the fill color of a cell that I revise.

    I wonder if it is possible make this with conditional formatting. sayin Excel that : Hey, if any cell (whose cell lengths is bigger than 0) are revised change the fill color !

    is it possibe 🙂

    • Orkun…You can do this using Conditional Formatting if you make a copy of the worksheet before you start making changes. Then, assuming your data is in A2:M100 of worksheet «Report» and the second worksheet is called «Copy», you can try this.

      * Select the range for the conditional formatting, i.e. A2:M100
      * Enter «=AND(LEN(A2)>0,A2Copy!A2)» (no quote marks) as the Conditional Formatting formula.
      * Set the formatting for the changed cells.

      To reset the colors to No Fill, copy from «Report» and paste the values into «Copy».

      Alternatively, there is a VBA option. Add something this to the worksheet module in the Visual basic Environment (VBE).
      Private Sub Worksheet_Change(ByVal Target As Range)
      If Len(Target.Value) > 0 Then
      Target.Interior.Color = rgbYellow
      End If
      End Sub

      To reset these colors to No Fill, highlight the area and just clear the color fill formatting.

  7. This CF formula highlights empty cells but not if the entire row is empty:

    =(B3=»»)*NOT(AND(($B3:$J3=»»)))

  8. Amazing story, Chandoo. 🙂

  9. Haz says:

    You could also highlight the whole row when any value is blank:
    =OR(ISBLANK($B3:$J3))

  10. […] he is sitting in airport lounges, Chandoo is still helping people with Excel problems. Read his tips for highlighting blank cells – he shares 3 ways to do […]

  11. Randy says:

    I just use the Replace function. Highlight the region that contains cells that DO HAVE and DO NOT HAVE values or are blank. Type CNTRL+H and do a format fill on the «replace with:» cells with the color of your choice.

  12. Damaris624 says:

    What if I want to highlight a row, but only if a condition exists. For example, my spreadsheet has 10 columns and I want to highlight blanks within the row but only if $A1 is not equal to blank.

    • Damaris624,

      CF Formula:
      =($A1″»)*(A1=»»)

      • WordPress rmoved my less than and greater than signs.

        CF Formula:
        =($A1less than,greater than»»)*(A1=»»)

  13. Hi,

    Thanks for the example. Learned something new today.
    I tried to use the formula below in my table.
    =OR(LEN($B4)=0,LEN($C4)=0)

    Instead of highlighting entire row, it is highlighting the row which is just above the row in which the cell value length=0.

    Sorry i am a beginner.

    • @Manoj
      Lets assume that your data range is A10:D15
      If you had chosen A9:D15 instead of the original range that would explain that
      Select the range and remove the CF
      Try again

      If this doesn’t help can you ask the question at the Forums and attach a sample file
      http://chandoo.org/forum/

  14. Ashley says:

    I am trying to use the «Go To Special-Blanks» feature to fill in blanks from a pivot. I use this all the time, but am trying to do this from my laptop (and not on my docking station as it usually is) and it’s not working. Is this not possible from a laptop??

  15. Anita says:

    Thank you for these clear instructions; you just made my life (at work) much easier!

  16. sharon dev says:

    Hi Chandoo,
    I need your help regarding conditional formatting for blanks.

    I selected the range for my worksheet used the conditional formatting for displaying blanks and used the filters to narrow downto individual persons so that they would fill in the blanks. So I created macros for each person who needs to fill up the blanks.(to save time)
    However after recording a macro instead of displaying/highlighting only empty cells it is highlighting the whole row with blanks. How do I correct this.
    Below is the code

    Range(«A3:L27»).Select
    ActiveWindow.ScrollColumn = 7
    ActiveWindow.ScrollColumn = 8
    ActiveWindow.ScrollColumn = 9
    ActiveWindow.ScrollColumn = 10
    ActiveWindow.ScrollColumn = 11
    Range(«A3:L27,N3:N27»).Select
    Range(«N3»).Activate
    ActiveWindow.ScrollColumn = 12
    ActiveWindow.ScrollColumn = 13
    ActiveWindow.ScrollColumn = 14
    ActiveWindow.ScrollColumn = 15
    Range(«A3:L27,N3:N27,R3:R27,W3:W27»).Select
    Range(«W3»).Activate
    ActiveWindow.ScrollColumn = 14
    ActiveWindow.ScrollColumn = 12
    ActiveWindow.ScrollColumn = 8
    ActiveWindow.ScrollColumn = 6
    Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
    «=LEN(TRIM(W3))=0»
    Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
    With Selection.FormatConditions(1).Interior
    .Pattern = xlGray8
    .PatternColorIndex = xlAutomatic
    .ColorIndex = xlAutomatic
    End With
    Selection.FormatConditions(1).StopIfTrue = False
    ActiveSheet.Range(«$A$3:$W$27»).AutoFilter Field:=7, Criteria1:= _
    «Sharon Dev»
    ActiveWindow.ScrollRow = 14
    ActiveWindow.ScrollRow = 13
    ActiveWindow.ScrollRow = 10
    ActiveWindow.ScrollRow = 7
    ActiveWindow.ScrollRow = 4
    End Sub

  17. mike says:

    why not vba macro to avoid having repeat all this? Something that hides rows with no blank cells and highlights blank cells?

  18. sharon dev says:

    Hi Chandoo,

    I used conditional formatting for finding and sisplaying all blank cells in an exel worksheet. I used filters on a column as I need to find out number of blank cells each employee has. I recorded macros against each employee and assigned some shortcuts in the macro.

    For eg; If say a macro is applied ctrl+Shift+j for John Doe it would display the blanks so he has to enter them.

    Now I want to know the count of blank cells for each employee and having difficultis in it.

    How do I go about it . Here is some code
    Sub Displayblanks_John_Doe()

    ‘ Displayblanks_John_Doe Macro

    ‘ Keyboard Shortcut: Ctrl+Shift+J

    Range(«A3:L26»).Select
    Range(«A3:L26,N3:N26»).Select
    Range(«N3»).Activate
    Range(«A3:L26,N3:N26,R3:R26»).Select
    Range(«R3»).Activate
    Range(«A3:L26,N3:N26,R3:R26,W3:W26»).Select
    Range(«W3»).Activate
    Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
    «=LEN(TRIM(A3))=0»
    Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
    With Selection.FormatConditions(1).Interior
    .Pattern = xlGray8
    .PatternColorIndex = xlAutomatic
    .ColorIndex = xlAutomatic
    End With
    Selection.FormatConditions(1).StopIfTrue = False
    ActiveSheet.Range(«$A$3:$W$26»).AutoFilter Field:=7, Criteria1:= _
    «John Doe»
    Dim mycount As Long
    mycount = Application.WorksheetFunction.CountBlank(ActiveSheet.Range(«$A$3:$W$26»))
    MsgBox («Number of empty cells = » & mycount)

    End Sub

    However it doesnt display the blank cells correctly . Also when I close the mssgbox it goes back to the original sheet. I need it toi stay on the sheet so as to allow employees to fill in the blanks.

  19. Pierre says:

    I have a table of data. Each row is a logged message that I am tracking. Completed messages in a column are white, pending messages in a column are red. Each message is routed to different staff members, which shows where the last stop is with a specific staff member. With the pending messages, I want to find the last stop of the message was with and I want to count how many pending messages does a particular staff member have. I have 5 staff members to tally pending messages for. Please e-mail with the formula. My e-mail is pierrevu1013@gmail.com.
    Thank you

  20. Hemal says:

    Hi
    I stumbled on this page while looking for tips on excel. I am creating an Excel template for my application users to upload it with data. To keep the data clean, I am creating validations. One place I need help is I have two data fields V2 and W2, either one of them is a required field. If the user didn’t enter any data in V2 then I need to highlight W2 field. Does anyone how I can achieve this. Thank you in advance.

  21. Mark says:

    I cringed at this storyline, but thanks nonetheless

Leave a Reply

In this article, we will learn:

How To Check If A Cell Is Blank Using IF

How To Check If A Cell Is Blank Using ISBLANK

Count Blank Cells Using COUNTIF

Count Blank Cells Using COUNTBLANK

Assume you have this data.

wer

Let’s just step into the example.

How To Check If A Cell Is Blank Using IF

Generic Formula

=IF(cell_address=»»,TRUE,FALSE)

In the above data, there are some names that are missing. In Column C you want TRUE if it doesn’t have a name and FALSE if it does. It is easy to do this. In C2 write this formula and copy it in the cells below.

efr

The formula simply checks to see if the cell is blank or not. It uses “”  to indicate blank. Prints TRUE  if it is blank, and FALSE if not.

How To Check If A Cell Is Blank Using ISBLANK

Generic Formula

Now the same task can be done easily by using the ISBLANKfunction in excel 2016.

ISBLANK takes only one argument and that is the cell you want to check.

In D2 write this formula and copy it below cells.

This will be your result.
etgr

You got the same answers by giving just one argument in ISBLANK.

Mostly you would want to do something after knowing if the cell is blank or not. This is where IF is necessary.

For example, if you want to print the name Cells of B column has one, and “mystry_man” if it is a blank cell. You can use IF and ISBLANK in excel together.

In Range E2, write this formula:

wr

Count Blank Cells Using COUNTIF

Generic Formula

Now if you want to know how many blank cells there are, you can use this formula.

In any version of Excel 2016, 2013, 2010, write this formula in any cell.

fteg

We have our answer as 7 for this example.

Now if you want to know how many names there are, you need to count if not blank. Use the COUNTA function to count non-blank cells in a range.

wwer

Count Blank Cells Using COUNTBLANK

Generic Formula

COUNTA counts if cell contains any text and the COUNTBLANK function counts all blank cells in a range in Excel. It only requires one argument to count empty cells in a range.

In cell G2, enter this formula:

ery

COUNTBLANK will find blank cells in excel of the given range.

We learned how to work with blank cells in excel, how to find blank cells, how to count blank cells in a range, how to check if a cell is empty or not, how to manipulate blank cells etc.

Related Articles:

How to Calculate Only If Cell is Not Blank in Excel

Adjusting a Formula to Return a Blank

Checking Whether Cells in a Range are Blank, and Counting the Blank Cells

SUMIF with non-blank cells

Only Return Results from Non-Blank Cells

Popular Articles:

50 Excel Shortcuts to Increase Your Productivity

How to use the VLOOKUP Function in Excel

How to use the COUNTIF function in Excel

How to use the SUMIF Function in Excel

Понравилась статья? Поделить с друзьями:
  • Finding data in excel vba
  • Finding cells in excel vba
  • Finding capital letters in word
  • Finding a word on a web page
  • Finding a word in vim