Function Problems

How to Fill Blank Cells with the Previous Account Number in Excel

Phi Hung VoPhi Hung Vo Nov 10, 2026 870 views

Question details

The user needs to populate empty cells in a column with the last non-empty account number directly above them until a new account number appears in the list.

How to Fill Blank Cells with the Previous Account Number in Excel
Product
Excel
Device & OS
not provided
Scenario
Organizing raw datasets where group labels like account numbers are only entered once at the top of a group, leaving the rows below it blank.
Observed behavior
Account numbers appear only once per grouping, leaving subsequent rows empty, which prevents accurate sorting, filtering, or pivot table generation.
Before you start

Before applying bulk filling techniques, ensure you have selected only the specific data range you want to modify to avoid accidentally filling unintended blank cells elsewhere in your worksheet.

Solution 1Recommended

Use 'Go To Special' to Fill Blanks with the Cell Above

This is the most common and efficient method to fill empty cells with the value directly above them using Excel's built-in navigation tools.

The 'Go To Special' tool allows you to isolate only the blank cells within your selected range. By applying a relative formula to these selected blanks, you can instantly pull down the account number from the row above.

1
Select the data range

Highlight the entire column or the specific range of cells that contains both the account numbers and the blank cells you wish to fill.

2
Open Go To Special

Press 'F5' on your keyboard to open the 'Go To' dialog box, then click on the 'Special...' button in the bottom left corner.

3
Highlight blank cells

In the Go To Special window, select the radio button next to 'Blanks' and click 'OK'. All empty cells in your range will now be highlighted.

4
Enter the formula

Without clicking anywhere else on the sheet, type the equals sign '=' and press the 'Up Arrow' key on your keyboard. This creates a reference to the cell immediately above the first active blank cell.

5
Apply to all blanks

Hold down the 'Ctrl' key and press 'Enter'. This will instantly copy your formula into every highlighted blank cell, pulling the account numbers down.

Use 'Go To Special' to Fill Blanks with the Cell Above
Convert Formulas to Values: After filling the cells, copy the entire column and paste it over itself as 'Values' (Right-click > Paste Special > Values) to convert the formulas into static text.
Try WPS Spreadsheet for Data Processing

Easily Fill Blank Cells in WPS Office

WPS Spreadsheet provides robust data management tools, including the 'Go To Special' feature, allowing you to fill blank cells with previous account numbers in seconds. Enjoy a familiar interface to process your data without any learning curve.

  1. 1. Select the Data: Open your spreadsheet in WPS Office and highlight the column containing the account numbers and blanks.
  2. 2. Use Go To Special: Press Ctrl + G to open the 'Go To' dialog, select 'Blanks', and click 'Go To' to highlight empty cells.
  3. 3. Input the Reference: Type '=' and press the Up Arrow key to reference the account number cell directly above.
  4. 4. Apply Everywhere: Press Ctrl + Enter to instantly populate all the highlighted blank cells with the correct account numbers.
Fully compatible with Microsoft Excel (.xlsx, .xls) formats.Built-in 'Go To Special' functionality for bulk blank cell filling.Free, lightweight, and easy-to-use alternative for daily data processing.
QA img-9

Frequently Asked Questions

Why do I get an error when I press Ctrl+Enter after selecting blanks?

This usually happens if you accidentally click on a cell with your mouse after using the 'Go To Special' > 'Blanks' command, which deselects the highlighted empty cells. Make sure to type the equals sign (=) immediately after clicking OK in the dialog, without clicking anywhere else.

How can I prevent the filled cells from changing if I sort the data?

Because the filled cells rely on formulas pointing to the cell above them, sorting the data will break the sequence. Before sorting, you must convert the formulas to text. Select the filled column, press Ctrl+C to copy, right-click the selection, and choose 'Paste as Values'.

Is it better to fill the blanks or restructure my spreadsheet?

While filling blanks is an excellent quick fix for pivot tables and filtering, repeating group labels with empty rows is generally considered poor data design. For long-term reliability, it is highly recommended to store your data in a normalized table where every row contains a complete record.