Fill Blank Excel Cells with the Previous Value
Question details
Fill blank cells in imported worksheet data with the most recent nonblank value above them.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Data imported from multiple worksheets contains gaps in a column, and the user wants to carry each existing value down through the following blank cells.
- Observed behavior
- Blank cells should display the nearest preceding nonblank value without inserting new worksheet rows.
Identify the column and data range to fill, and make sure the first cell in that range contains a value. For the SCAN method, leave an empty output range outside the source data.
Use SCAN to carry values down in Excel 365
Use this formula to create a separate result that updates when the source data changes.
Click an empty cell outside the source range, such as E1 if the source data is in D1:D13. Make sure the cells below it are empty so the results can spill.
In E1, enter =SCAN("",D1:D13,LAMBDA(a,v,IF(v="",a,v))) and press Enter. Adjust D1:D13 to match your source range.
Review the spilled results in E1:E13. Each blank source value should be replaced in the output by the most recent nonblank value.

Fill blank cells in place with Go To Special
Use this method to populate empty cells directly in a selected column.
Fill Blank Cells with the Value Above in WPS Spreadsheet
Use Go To Special in WPS Spreadsheet to select empty cells and fill them with references to the values above.
- 1. Open the workbook: Open WPS Spreadsheet and choose Open to select your Excel workbook.
- 2. Select the range: Select the cells in the column you want to fill, starting with a nonblank cell.
- 3. Find the blanks: Press Ctrl+G, choose Special, select Blanks, and confirm.
- 4. Fill the selected cells: Type =, press the Up Arrow key, and press Ctrl+Enter. To keep fixed values instead of formulas, copy the filled range and use Paste Special > Values.

Frequently Asked Questions
Does the SCAN formula update when the imported data changes?
Yes. The output recalculates when values in the referenced range change. Update the range in the formula if your imported data extends beyond it.
Why does Go To Special miss some cells that look blank?
Those cells may contain formulas that return an empty string. Go To Special > Blanks selects empty cells, not cells containing formulas.
Can a formula insert a new worksheet row?
No. A formula can return values in existing cells but cannot insert rows. To insert one manually, right-click a row number and choose Insert.
How do I remove the fill formulas but keep their results?
Select and copy the filled range, then use Home > Paste > Values in Excel, or Paste Special > Values in WPS Spreadsheet.




