Arte SheetsLearn. Try. Understand.

Lookup & Reference

Get First Text Value in a Row or Column (Skipping Blanks & Numbers)

Extract the first non-empty text entry across mixed blank, numeric, and text cells using wildcard XLOOKUP("?*", B2:F2, B2:F2, "No Text Found", 2) or INDEX + MATCH("?*", ...).

Why "?*" skips empty strings AND pure numbers in one clean lookup!

Horizontal approval workflows and ragged ERP imports often mix blank cells, numeric batch codes (420, 99.5), and status notes ("Pending QA", "Released") across columns B through F. Searching for "*" alone can trip on zero-length "" formula blanks, while scanning for the first non-blank cell grabs numbers like 420 instead of the first actual text note!

Combining the one-character wildcard "?" with any-length "*" creates the pattern "?*"—meaning "a text string containing AT LEAST 1 character"! Passing match_mode = 2 (wildcard mode) into XLOOKUP("?*", B2:F2, B2:F2, "No Text Found", 2)—or search_mode = -1 at the end to grab the LAST text entry in the row—ignores blanks and pure numbers automatically!

Row Values B2:F2Lookup DirectionWildcard Formula PatternReturned Text
["", 420, "Pending QA", 88, "Approved"]First Text (Left -> Right)XLOOKUP("?*", B2:F2, B2:F2, "No Text", 2)"Pending QA"
["", 420, "Pending QA", 88, "Approved"]Last Text (Right -> Left)XLOOKUP("?*", B2:F2, B2:F2, "No Text", 2, -1)"Approved"
["", 420, 105, 88, 0] (Numbers Only)Fallback Triggeredif_not_found Argument"No Text Found"

First Non-Empty Text Value in a Row (Left-to-Right Wildcard XLOOKUP)

Uses wildcard match_mode = 2 with "?*" to skip blank cells and numeric entries across B2:F2.

=XLOOKUP("?*", B2:F2, B2:F2, "No Text Found", 2)

Classic INDEX + MATCH("?*", Range, 0) Column Position of First Text

Returns the 1-based relative column index where the first non-empty text cell appears.

=IFERROR(MATCH("?*", B2:F2, 0), "No Text Found")

Try the example

Use the original values or change them to test your understanding.

Further reading