Function Problems

How to Find Adjacent Blank Cells in an Excel Row with Formulas

Nimra MalikNimra Malik Nov 2, 2026 870 views

Question details

The user needs a method to determine whether a specific row contains two or more consecutive blank cells, regardless of the contents of the non-blank cells.

How to Find Adjacent Blank Cells in an Excel Row
Product
Spreadsheet
Device & OS
not provided
Scenario
Cleaning or analyzing datasets where rows missing consecutive data points need to be flagged for review.
Observed behavior
The goal is to output a specific indicator, such as 'Yes' or 'No', to flag rows that have adjacent empty cells.
Before you start

Ensure your data range is contiguous and note the exact starting and ending columns for the row you want to check (for example, B2 to J2).

Solution 1Recommended

Use an Array Formula with FREQUENCY and IF

Use a combined array formula to calculate the sequence length of blank cells and output 'Yes' if multiple consecutive blanks are detected.

This method uses an array formula to calculate the frequency of empty cells grouped by the positions of non-empty cells. If the maximum frequency of these groupings is greater than 1, it indicates the presence of consecutive blank cells.

1
Select the target cell

Click on an empty cell where you want the result to appear (e.g., cell K2 next to your data row).

2
Input the array formula

Type or paste the following formula into the formula bar: =IF(MAX(FREQUENCY(IF(B2:J2="",COLUMN(B2:J2)),IF(B2:J2<>"",COLUMN(B2:J2))))>1,"Yes","No"). Adjust the range B2:J2 to match your actual data.

3
Execute the formula

If you are using Microsoft 365 or WPS Spreadsheet, simply press Enter. If you are using an older version of Excel, you must press Ctrl + Shift + Enter to apply it as an array formula.

4
Apply to other rows

Click the small square at the bottom-right corner of the cell (fill handle) and drag it down to apply the formula to the remaining rows.

Use an Array Formula with FREQUENCY and IF
Array Formula Confirmation: If you pressed Ctrl + Shift + Enter correctly in older versions, you will see curly braces {} automatically appear around the formula in the formula bar.
WPS Spreadsheet Solution

Easily Manage Complex Array Calculations in WPS Office

WPS Spreadsheet fully supports advanced array formulas, including FREQUENCY and IF combinations, making it simple to identify adjacent blank cells. It provides a lightweight, highly compatible environment for all your advanced data analysis tasks.

  1. 1. Open your dataset: Launch WPS Spreadsheet and open the workbook containing the rows you want to analyze.
  2. 2. Apply the formula: Select the result cell and paste the MAX/FREQUENCY formula to check for blanks.
  3. 3. Confirm and drag: Press Enter (or Ctrl+Shift+Enter) and drag the fill handle to apply the check across all your data rows.
Fully compatible with Microsoft Excel array formulas and functions.Easily execute complex data checks like finding consecutive blank cells.Lightweight architecture ensures large datasets load and calculate quickly.
microsoft office alternative - wps office

Frequently Asked Questions

How do I change the formula to detect three or more adjacent blank cells?

To detect three consecutive blank cells instead of two, modify the logic condition at the end of the formula. Change the '>1' to '>2' (e.g., ...>2,"Yes","No").

Why does the formula return an error message when I press Enter?

In older versions of Excel that do not support dynamic arrays, combining IF and COLUMN functions inside FREQUENCY requires array processing. You must press Ctrl+Shift+Enter simultaneously instead of just Enter.

Can I use Conditional Formatting to highlight the rows instead?

Yes, you can use a modified version of this formula within the Conditional Formatting rules. Select your rows, go to Conditional Formatting > New Rule > Use a formula, and paste the logic portion (without the IF statement) to apply a background color.