How to Find and Replace Blank Cells in Google Sheets

In Google Sheets when you deal with a large dataset, it is very difficult to find and replace blank cells. But luckily by using some methods you can easily overcome this problem. In this article, we will try to explain the ways to find and replace blank cells in Google Sheets.

overview of find and replace blank cells in google sheets


A Sample of Practice Spreadsheet

You can download the practice spreadsheet from the download button below.


3 Ways to Find and Replace Blank Cells in Google Sheets

You can apply three techniques to find blank cells and replace them with a 0 (zero) value. The techniques are: using the find and replace option, inserting filter, and applying a function

To show all the methods we create a dataset containing the Fruits Name and Quantity (Kg).

dataset for find and replace blank cells in google sheets


1. Using Find and Replace Option

You can easily replace the blank cells with 0 by applying the Find and Replace feature. To do so,

  • First, select a range of cells in which you want to apply the technique. Here, we select the range C5:C10.

select range for find and replace option

  • Then go to the Edit bar and select the Find and Replace feature. You can also use the CTRL+H shortcut to open the find and replace option.

select find and replace option in google sheets

  • After that Find cell type ^\s*$ to find blank cells and in the Replace option type 0.
^\s*$
  • This is a regular expression for whitespace.

insert find and replace value

  • Now, check the ‘Match case’ and ‘Search using regular expressions’ boxes. You will find the blank cell number at the top of the Find bar.

insert conditions for find and search blank cells

  • In the end, click on the Replace All button and then press Done.

apply the find and replace technique

  • Finally, you will find the blank cells replaced with 0 in the dataset.

find and replace blank cells with zero in google sheets

Read More: How to Use REPLACE Function in Google Sheets (4 Examples)


2. Inserting Filter Feature

By inserting the filter option, you can separate or filter the blank cell data and then easily fill them with 0 or whatever you want to input. To apply this technique,

  • In the beginning, select the column and go to the Data menu and select Create a filter option.

create a filter in google sheets

  • Now, you can see a filter icon next to the selected column.

create a filter in google sheets

  • Go to the filter icon and you will find all the values selected to filter.

create a filter in google sheets

  • Now, click on the “Clear” option to clear the list.

clear filter list

  • Then, select only “Blank” from the list and press OK.

select blank option to filter in google sheets

  • You can find the bank values in the filtered dataset.

filtered data in google sheets

  • Now, insert 0 in the blank cell.

insert zero in blank cells

  • After that drag down the fill handle to insert the value into the entire column.

insert zero in blank cells

  • In the end, press ‘Remove filter” to remove the filter option.

remove filter from google sheets

  • Finally, you will find the whole dataset where the blank cells fill with 0 value.

outcome of find and replace blank cells in google sheets

Read More: How to Use Data Validation and Filter in Google Sheets (4 Ways)


3. Applying Functions

We can also apply formulas to find and replace blank cells. But if you apply the formula directly to your dataset it might change the formatting. To avoid this error, we create a new column name “Formula Outcome” to apply the formulas and then paste it into the main desired column.

dataset to insert formula technique to find and replace blank cells

Read More: How to Find and Replace Multiple Values in Google Sheets


Similar Readings 


3.1 ISBLANK Function

The ISBLANK function is very simple and basic. This function checks whether the referenced cell is truly blank or not. To get the exact result we combine this ISBLANK function witty the IF function.

  • First, select a cell where you want to apply the formula. Here, we select cell D5.

select cell to apply formula

  • Then insert the IF function.

insert if function in google sheets

  • After that add the ISBLANK function.

insert isblank to find and replace blank cells

  • Now, insert the C5 cell as the value argument.

add value argument in the function

  • The whole ISBLANK function is used as a logical_expression parameter in the IF function.

insert value in google sheets if function

  • Now, add 0 for the value_if_true parameter.

insert value in google sheets if function to find and replace blank cells

  • Apply the cell C5 for value_if_false.

insert value in google sheets if function to find and replace blank cells

  • Press ENTER, and you will find the result.
=IF(ISBLANK(C5),0,C5)

output of the function

Formula Breakdown

  • ISBLANK(C5): The ISBLANK function only returns TRUE or FALSE. For blank cell it presents TRUE on the other hand, for value it turns FALSE.
  • IF(ISBLANK(C5),0,C5): It specifies the ISBLANK function. If it returns TRUE then the value will be 0, if it returns FALSE then the original value remains.
  • Now, apply the formula to the entire column by dragging down the fill handle.

find and replace blank cells with zero in google sheets

  • After that select the entire new column and press CTRL+C to copy and click on CTRL+SHIFT+V to paste only the values in the source column.

copy and paste the values

  • Finally, delete the Formula Outcome column. The blank cells now fill with the 0 value.

outcome of find and replace blank cells in google sheets


3.2 N Function

The N function is very handy if you want to replace your all-blank cells with 0 because if you insert a number, you will get the same as you insert, but if you insert text or blank cells it automatically returns 0. You will be able to input the formula into the entire column by combining the N function with the ARRAYFORMULA function.

  • In the earlier stage, select cell D5.

select cell to insert formula

  • Now, apply the ARRAYFORMULA function.

apply arrayformula in google sheets

  • After that, insert the N function.

add n function in google sheets

  • Then add the entire source column as value.

insert value range to find and replace blank cells

  • Press ENTER and you will find the outcome in the entire column.
=ARRAYFORMULA(N(C5:C10))

outcome of the formula

Formula Breakdown

  • C5:C10: Represents the range from where the blank cells will be found.
  • N(C5:C10): Returns the same number for the numbered cell and 0 for the blank cells.
  • ARRAYFORMULA(N(C5:C10)): This helps to apply the formula to the entire column in one go.
  • Copy the results by clicking on CTRL+C and paste only the value in the source column by pressing CTRL+SHIFT+V.

copy and paste the blank cell values

  • Finally, remove the new generate column and you will find the blank cells filled with 0 in the original dataset.

find and replace blank cells in google sheets


Things to Remember

  • Carefully input the regular expression.
  • Apply the formulas in different cells to avoid format errors.

Conclusion

We believe this article will be helpful for you if you want to find and replace blank cells in Google Sheets. For further queries feel free to comment. Moreover, you can explore the OfficeWheel website to learn more about any functions of Google Sheets.


Related Articles

Annyca Tabassum

Annyca Tabassum

Hello, I'm Annyca Tabassum. I currently work for the SOFTEKO as a technical writer and content developer. I have completed my graduation and post-graduation from SUST.

We will be happy to hear your thoughts

Leave a reply

OfficeWheel
Logo