Function Problems

Find the First Nonblank Cell in an Excel Row While Skipping a Value

Maira MehtabMaira Mehtab Dec 2, 2026 868 views

Question details

Find the first cell in a horizontal range that is not blank and does not equal a specified value.

Find the First Nonblank Cell in an Excel Row While Skipping a Value
Product
Microsoft Excel
Device & OS
not provided
Scenario
Search a row from left to right, skipping blank cells and cells containing the excluded value A.
Observed behavior
The formula should return the first qualifying cell value in the range.
Before you start

Identify the worksheet and horizontal range to search, along with the exact value to exclude. The examples below search Tab!A7:L7 and skip cells equal to A.

Solution 1Recommended

Use INDEX and MATCH to Skip Blanks and an Excluded Value

Use this formula to return the first qualifying value from a row, including cells with formulas that return an empty string among the blanks to skip.

MATCH finds the first position where both conditions are true, and INDEX returns the value at that position. The comparison excludes cells equal to A, not cells that merely contain A as part of longer text.

1
Select a result cell

Click an empty cell outside Tab!A7:L7 where you want the result to appear.

2
Enter the formula

Type =INDEX(Tab!A7:L7,1,MATCH(1,(Tab!A7:L7<>"")*(Tab!A7:L7<>"A"),0)) in the selected cell.

3
Confirm the formula

Press Enter in Microsoft 365. In older Excel versions, press Ctrl+Shift+Enter to enter it as an array formula.

4
Adjust the exclusions

Replace Tab!A7:L7 and "A" with your range and excluded value. To also skip B, add *(Tab!A7:L7<>"B") after the A condition inside MATCH.

Use INDEX and MATCH to Skip Blanks and an Excluded Value
If no value matches: The formula returns #N/A when no cell meets the conditions. To display a blank instead, wrap the formula in IFERROR, such as =IFERROR(INDEX(Tab!A7:L7,1,MATCH(1,(Tab!A7:L7<>"")*(Tab!A7:L7<>"A"),0)),"").
Find qualifying values in WPS Spreadsheet

Find the First Eligible Value in WPS Spreadsheet

Use INDEX and MATCH in WPS Spreadsheet to search a row from left to right while skipping blank cells and a specified value.

  1. 1. Open the workbook: Open WPS Spreadsheet and select Open to load your Excel workbook.
  2. 2. Choose a result cell: Click an empty cell outside the row you want to search.
  3. 3. Enter the formula: Type =INDEX(Tab!A7:L7,1,MATCH(1,(Tab!A7:L7<>"")*(Tab!A7:L7<>"A"),0)) and replace the range or excluded value as needed.
  4. 4. Confirm and save: Press Enter to calculate the result; if your WPS version requires array entry, use Ctrl+Shift+Enter. Select Save to keep the formula in the workbook.
Find the first nonblank value that does not equal A.Add conditions to exclude more values from the row.Open and edit Microsoft Excel XLS and XLSX files.Work with formulas in a familiar spreadsheet interface.
microsoft office alternative - wps office

Frequently Asked Questions

How do I skip more than one value?

Add another condition inside MATCH for each value. For example, append *(Tab!A7:L7<>"B") after the condition that excludes A.

Does the formula skip cells containing only spaces?

No. A cell containing spaces is not considered blank by the <>"" condition. Remove unwanted spaces from the source cells before using the formula if they should be treated as blank.

Why does the formula return #N/A?

There may be no cell in the selected range that meets both conditions. Check the range and excluded value, or wrap the formula in IFERROR to display a different result.

Does excluding A also exclude words that contain A?

No. The condition <>"A" excludes cells whose entire value equals A; it does not exclude longer text containing that letter.