Excel: How to fill blank cells with N/A using three methods

Here are some easy methods for the task!
Last Updated on May 2, 2024
Logo consisting of a green square with a smaller overlapping square with a white 'Excel' logo in the center, set against a blue gradient background.
You can trust PC Guide: Our team of experts use a combination of independent consumer research, in-depth testing where appropriate - which will be flagged as such, and market analysis when recommending products, software and services. Find out how we test here.

Looking for a simple way to fill empty cells with “N/A” in your Excel sheets? You’ve come to the right place. Excel has several straightforward methods to help you do just that, making sure no cell is left blank.

In this easy-to-follow guide, we’ll walk you through three quick steps to add “N/A” to any empty spaces in your spreadsheet. Whether you’re new to Excel or just looking for a quick fix, this guide is perfect for keeping your data neat and complete. So, without wasting another second, let’s get straight into it!

How to replace blank cells with N/A in Excel

Here’s a straightforward look at our Excel dataset, where you’ll notice some cells under the ‘Position’ column are empty. These blank spaces can make data analysis a bit tricky, as they represent missing information. To address this, we will fill these blank cells with “N/A,” which means “Not Available.”

A spreadsheet in Excel titled "dataset," displaying a table with columns labeled "name", "department", and "position", listing employee details in rows 5 to 12.
Dataset

Method 1: Use the Replace function to fill empty cells with N/A

If you’ve ever needed to account for missing data in Excel, filling blank cells with “N/A” is a standard approach. In our example dataset, we can see that some cells under the ‘Position’ column lack entries. To ensure that our dataset is fully populated and that any gaps are clearly marked as “Not Available,” we can use the Replace command in Excel. This technique is particularly useful if we want to quickly identify cells that are intentionally left without information

  • Start by selecting the cells in the ‘Position’ column where some data is missing, specifically the range C4:C13 in our sheet.
  • Next, head over to the Home tab. In the Editing group, you’ll find the ‘Find & Select’ button. Click on it and choose ‘Replace’ from the dropdown menu.
Screenshot of an Excel interface highlighting the "replace" function in the "find & select" menu on the home tab, with example data visible in the spreadsheet cells.
Replace
  • The ‘Find and Replace’ dialog box will pop up. Leave the ‘Find what’ field blank because we’re targeting empty cells. In the ‘Replace with’ field, type “N/A.”
Screenshot of the "find and replace" dialog box in Excel, with "N/A" entered in the "replace with:" field to fill blank cells.
Replace with N/A
  • Click on ‘Replace All’. This action will prompt Excel to search for all blank cells in the selected range and fill them with “N/A.”
  • Click on OK after the dialogue box with the number of N/A replacements appears.

After completing these steps, all the previously empty cells in our dataset’s ‘Position’ column will display “N/A,” signifying that the information is unavailable. This change will complete our dataset and ensure that any analysis performed on the data takes into account these intentionally empty fields.

Spreadsheet in Excel with a table titled "replace function" listing names, departments, and positions of 9 individuals across 3 columns.
Replace function

Method 2: Add ‘N/A’ to empty Excel cells with Go To Special

We can also use the ‘Go To Special’ feature in Excel. Here’s how to do it for the range C3:C12 in our dataset:

  • Begin by highlighting the cells C3:C12, which includes the entire ‘Position’ column where data might be missing.
  • Go to the ‘Home’ tab on the Excel ribbon. In the ‘Editing’ group on the far right, find and click on ‘Find & Select,’ then choose the ‘Go To Special’ option from the dropdown menu.
Screenshot of Excel with a "replace" tutorial, highlighting the "find and select" menu options and an active dialog box used to fill blank cells in a spreadsheet.
Go to Special
  • Click ‘OK,’ and Excel will return you to your worksheet with all blank cells now selected.
Screenshot of the "go to special" dialog box in Excel with the "Fill Blank Cells" option selected, highlighted by a red rectangle.
Select Blanks
  • With the blank cells selected, type “N/A” into the active cell, which is usually the first blank cell in your range.
Screenshot of an Excel spreadsheet with a list of names, departments, and positions highlighted to show one cell filled with "N/A" in the 'position' column.
Type N/A in empty cell
  • Without clicking anywhere else or deselecting the cells, press ‘Ctrl’ + ‘Enter.’ This will fill all selected blank cells with “N/A.”

By following these steps, you’ve now successfully filled all blank cells within the selected range with “N/A,” making it clear that the data is intentionally unavailable in those spots. This can help in further data processing or analysis tasks, ensuring that empty cells are properly accounted for.

Spreadsheet in Excel displaying a table with columns for name, department, and position, filled with data for various individuals.
All blank cells filled

Method 3: Automating ‘N/A’ entry in empty cells with VBA

For our dataset, here’s how to fill the blank cells with “N/A” using VBA (Visual Basic for Applications):

  • Press ALT + F11 to open the VBA editor.
  • Go to Insert > Module to create a new module.
Screenshot of Microsoft Excel Visual Basic for Applications window, showing a user adding a class module to the VBAProject in Microsoft Excel.
New module
  • Copy and paste the following VBA code into the module:

Sub FillBlanksWithNA()

    Dim ws As Worksheet

    Set ws = ActiveSheet

    With ws

        ‘ Change the range according to your dataset

        Dim rng As Range

        Set rng = .Range(“C4:C12”)

        ‘ Loop through each cell in the range and set the value to N/A if the cell is empty

        Dim cell As Range

        For Each cell In rng

            If IsEmpty(cell.Value) Then cell.Value = “N/A”

        Next cell

    End With

End Sub

  • Close the VBA editor and go back to your Excel worksheet.
  • Press ALT + F8, select FillBlanksWithNA, select your workbook, and then click ‘Run’.
Screenshot of an open Excel workbook with a VBA module window open, showing a user interface for matching book names, highlighted in red.
Run Macro

After running this script, all the blank cells in the ‘Position’ column within the range C3:C12 will be filled with “N/A”. This VBA approach is especially useful if you have a large dataset and want to automate the process of filling in blanks.

Excel spreadsheet with three columns labeled: name, department, and position, filled with various employee names and their corresponding departments and job titles.
Data filled

Conclusion

To wrap it up, filling in the blanks with “N/A” in Excel helps keep your data clear and analysis-ready. We’ve gone over three straightforward methods: using the Replace feature, the Go To Special command, and a bit of VBA magic. These steps are easy to follow and can make a big difference in how you manage and interpret your data.

Want to learn more about Excel? If yes, then give these guides a read:

Abdul is a tech writer and Editor for PC Guide, specializing in all things tech, gaming, and hardware.