How To Replace Blank Cells With 0 in Excel [1 Minute Guide]

Are you tired of scrolling through your Excel sheet only to find blank cells that throw off your data analysis? Don’t worry, there’s an easy fix!

You can quickly replace all those annoying blanks with zeros using a few simple steps. This will not only make your data look cleaner and more organized, but it will also make it easier to work with and analyze.

So don’t let blank cells bring you down – follow these simple instructions and say goodbye to those vexatious gaps for good!

how-to-replace-blank-cells-with-zero-excel

4 Simple Ways To Replace Blank Cells In Excel With 0

There are several reasons why you might want to replace all blank cells with 0 in Excel:

  • It can make it easier to perform calculations on your data. If you have a formula that references a cell that is blank, the result will show an error. If you replace the blank cell with 0, the formula will treat the cell as a number and will return a result.
  • It can make your data easier to read and understand. If you have a large spreadsheet with many blank cells, it can be difficult to see which cells contain data and which do not. By replacing the blank cells with 0, you can clearly see the data and any patterns or trends that may be present.reasons-to-replace-all-blank-cells-in-excel-with-0
  • It can help you to identify missing or incomplete data. If you see a 0 in a cell, you know that there is supposed to be a value there, but it is missing or incomplete. This can help you to identify areas where you need to collect more data.
  • It can help to make your data more consistent. If you have a formula that references cells in multiple rows or columns, it is important that those cells contain data in order for the formula to work correctly. By replacing blank cells with zeros, you can ensure that your formula will work consistently across all the cells it references.

The only drawback is that Excel won’t let you type in texts in all the selected cells at the same time. In this section, I will guide you through the best possible ways to fill the empty cells with zero within a desired range.

Here are the ways to replace blank cells in excel with 0:

1. Implement the Go to Special Command

The Go To Special Command is located in the Editing Ribbon. You can also press Ctrl + G to display the Go To dialog box.

Follow the instructions below to perform the procedure:

  1. Select the range of cells that you want Excel to search for blanks within.select-range-of-cells
  2. Go to the Home Tab and click on Find & Select.find-and-select
  3. Click on Go To Special and Select Blanks. This will highlight all the blank cells.go-to-specials-blanks
  4. Type 0 (zero) in any of the blank cells and Press Ctrl+Enter to apply it to all the selected cells.autofill-blanks

This method is one of the easiest methods if you are a beginner to excel and don’t know enough about Functions and Formulas. There is another method which is just finding the blank cells and replacing them with zero. Proceed to the next method if you want to learn more.

2. Use the Find & Replace Command

Open the Excel Spreadsheet and Select the desired range of cells that you want to search the blanks within. Press Ctrl+H to open the Find and Replace Dialog Box. Leave the Find Box Empty and Type 0 in the Replace Box. Click on Replace All and Select Okay to Apply the adjustments. find-and-replace-excel

These two methods were by far the easiest and only for beginners. If you want to learn more about Excel, you should know that there are multiple methods. Follow the next method to learn more.

3. Apply The ISBLANK Function

To insert 0 in the blank cells using the IF function in Excel, you can use the following formula:

=IF(ISBLANK(A1), 0, A1)

This formula checks the value in cell A1. If the cell is blank, the formula returns 0. If the cell is not blank, the formula returns the value of the cell.

To apply this formula to a range of cells, you can use the following steps:

  1. Select the range of cells that you want to update.
  2. Type the formula =IF(ISBLANK(A1), 0, A1) into the formula bar. isblank-function-excel
  3. Press Enter to apply the formula to the selected cells.
Note: The ISBLANK Function only works if you use a single column as a reference.

This will interchange all blank cells in the selected range with 0.

4. Use a VBA Code

Normally, the cell remains blank if there is no data. But you can display zero in those blank cells by running a VBA Code. To enable VBA Code, you have to enable the Developer Tab in Excel. The process is different for Mac and Windows.

For Windows, Click on the File tab. Go to Options > Customize the Ribbon. Select the Developer check box under Customize the Ribbon section and under Main Tabs.excel-enable-developer-tab

For Mac OS, Open the Excel Spreadsheet. Select Excel > Preferences (Cmd + ,). Click on View and Enable the Developer Tab. Close the Tab and Select the Developer Option from the Ribbon.

mac-excel-preference enable-developer-tab-excel-mac

You will see some options in this tab like the Visual Basic, Macros, Add-ins, Controls (insert checkboxes, buttons), and Xml. Now that you enabled the Developer’s Tab. you can now run the Visual Basic Codes.

Follow the instructions to run a VBA code to fill blank cells:

  1. Select the range of cells you want to switch.
  2. Go to the Developer Tab and Select Visual Basic.visual-basic-excel
  3. Click on Insert Module and Paste the Following VBA Code-
    Sub Fill_Blank_Cells_with_0_in_Excel()'Declare the variablesDim Selected_area As Range
    Dim Enter_Zero As String
    On Error Resume Next
    'Apply an input box to enter the value zero (0)
    Enter_Zero = InputBox("Type a value(O) that will fill blank cells", _
    "Fill Empty Cells")
    'Apply a For loop
    For Each Selected_area In Selection
    'Use an If statement to meet the condition
    If IsEmpty(Selected_area) Then
    Selected_area.Value = Enter_Zero
    End If
    Next
    End Sub
  4. Save the Macro Module and Click on the Run Sub/UserForm. run-macro-module
  5. Type a Value (0) that will fill up the blank cells and Select OK.
  6. Close the Tabs to see the desired results.

These were the four proven ways to interchange all the blanks with zeros. But, if you want to revert the process, you can also do it by following some simple steps.

How to Replace 0 in Excel with Blank Cells

I once encountered a QI Macros customer. Due to a machine transfer issue he had zeros in his data. So after running a histogram, his capability indices (Cp) were incorrect.

He inquired, “Is it possible to discard the zeros or does he have to manually eliminate them one by one from the given data sheet?”

The quick response: No, he must withdraw the zeros since Excel treats 0’s as data points rather than empty spaces.

The fastest way of replacing all the zeros with blank cells is to use the Find & Replace Option. Go to the Home Tab and click on Find & Select. Press on the Replace Option. Type 0 in the Find What Section and keep the Replace with section blank. Select Replace All to change all the zeros to blank cells. find-0-replace-with-blanks

Best Way To Replace Blank Cells With Zero in Excel Pivot Table

No doubt, a big dataset is difficult to present. Suppose, you are presenting the %sales data of this year to your boss. It will be a long 15 minute presentation. Your boss will get annoyed for sure. That’s where pivot tables come in handy! You can shorten the discussion and save time.

Do keep in mind that – Excel considers 0 (zero) as data points.

Follow the steps below to substitute empty cells with zero in pivot table:

  1. Right-Click on any cell of the Pivot Table.pivot-table-options
  2. Go to Pivot Table Options and Select Empty Cell as 0.empty-cells-show-0-excel
  3. Press Okay.

This will replace all the void cells and insert 0 in them. So, next time do perform this easy trick before presenting it to your boss.

Final Words

In conclusion, replacing blank cells with 0 in Excel is a simple process that can be accomplished using one of several methods. The most straightforward method is to use the Find and Replace feature, which allows you to search for and replace specific values in your worksheet.

Another option is to use an IF function, which can be used to check for blank cells and switch them with a specified value if necessary.

No matter which method you choose, replacing all the blank cells and putting 0 in them can be a useful tool for organizing and analyzing your data.