How to Return the First Name After a Blank Row in Excel
Question details
The user needs an Excel formula to dynamically identify and return the first name of a group in a column, where each group of names is separated by blank rows.
- Product
- Excel
- Device & OS
- not provided
- Scenario
- Managing a single-column list of grouped data separated by empty rows, and needing a helper column to constantly display the leading name of the current group.
- Observed behavior
- The user wants an adjacent cell to populate with the group's first name, carrying it down the list until a new blank row triggers the start of a new group with a new name.
Ensure your dataset is organized in a single column and that blank rows consistently serve as the only boundaries separating your groups.
Use an IF Formula to Carry Forward the Group Name
This solution uses a conditional IF formula to check if the preceding row is blank. If it is, the formula extracts the new group name; if not, it carries the existing group name downward.
By referencing the row directly above your target cell, Excel can evaluate whether a new section has started. A blank cell acts as the trigger for the formula to pull fresh data instead of repeating previous data.
Assuming your list of names is located in column D and starts from row 4, with cell D3 acting as an empty separator or header above the first group.
Select the adjacent cell where you want the first name to appear (for example, E4). Type the formula: =IF(D3="",D4,E3)
Press Enter to lock in the formula. Click the fill handle at the bottom-right corner of cell E4 and drag it down the column to apply the logic to the rest of your list.

Easily Manage Grouped Data with Formulas in WPS Spreadsheet
WPS Spreadsheet fully supports advanced logical functions like IF, allowing you to quickly organize, format, and manipulate grouped data with zero hassle. It provides an intuitive interface to handle your blank-row scenarios effortlessly.
- 1. Open your grouped dataset: Launch WPS Spreadsheet and open your document containing the grouped lists separated by blank rows.
- 2. Input the logical formula: Select the adjacent cell for your output and enter the IF formula, referencing the blank rows in your main column.
- 3. Use AutoFill to complete the column: Double-click the fill handle in the lower right corner of the active cell to automatically drag the formula down your entire dataset.

Frequently Asked Questions
What if my groups are separated by multiple consecutive blank rows?
If you have multiple consecutive blank rows, the standard IF formula might return a zero or duplicate a blank. You can prevent this by nesting another IF condition to check if the current row is also blank: =IF(D4="","",IF(D3="",D4,E3)).
Why is my formula returning a zero (0) instead of a blank text?
When an Excel formula references an empty cell, it typically evaluates the blank as a 0. To fix this behavior, you can either append &"" to your cell references or use custom cell formatting to hide zero values.
Can I extract the first name without using a separate helper column?
Extracting and carrying data down dynamically usually requires a helper column to store the carried-forward values. However, if your goal is simply to highlight or format the first name in each group, you can use Conditional Formatting applying the same =D3="" logic.




