FormulaCraft

How to return the first non-blank value in Excel and Google Sheets

Heads up: Excel and Google Sheets do this differently.

Excel
=INDEX(B2:F2,MATCH(TRUE,B2:F2<>"",0))
Google Sheets
=COALESCE(B2,C2,D2,E2,F2)

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1In Excel, enter =INDEX(B2:F2,MATCH(TRUE,B2:F2<>"",0)) as a Ctrl+Shift+Enter array formula (or just Enter in Excel 365 with dynamic arrays).
  2. 2In Google Sheets, use the simpler =COALESCE(B2,C2,D2,E2,F2) — it returns the first non-null, non-empty argument.
  3. 3Adjust the range to cover all columns (or rows) you want to search through.

Tips

Need the Google Sheets version instead? Open Sheets variant in workspace →

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

Frequently asked

Does COALESCE work in Excel?

No — COALESCE is a Google Sheets function. Use INDEX/MATCH or IFERROR chains in Excel.

What if the first non-blank is a number?

Both approaches return the value as-is, whether text or numeric, so no adjustment is needed.

Formulas used

Related tasks

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: