Function Problems

Combine Names and Surnames with Excel Dynamic Array Formulas

Steven ParkerSteven Parker Nov 18, 2026 872 views

Question details

Replace a Google Sheets ARRAYFORMULA with an Excel formula that combines names and surnames and leaves rows blank when the name is missing.

Combine Names and Surnames with Excel Dynamic Array Formulas
Product
Microsoft Excel
Device & OS
not provided
Scenario
A user has names and surnames in separate columns and wants one formula to produce a full-name column.
Observed behavior
The desired result is a list of combined names that spills down the output range, with blank results where the name is missing.
Before you start

Check that your Excel version supports MAP, LAMBDA, and dynamic arrays. For the example below, put names in A2:A8 and surnames in B2:B8, and clear the intended output cells.

Solution 1Recommended

Combine names row by row with MAP and LAMBDA

Use this formula in a supported Excel version to spill full names down the output column automatically.

1
Select the output cell

Click C2, outside any Excel table, and make sure C2:C8 is empty so the results have room to spill.

2
Enter the formula

In C2, enter =MAP(A2:A8,B2:B8,LAMBDA(name,surname,IF(name="","",name&IF(surname="",""," "&surname)))) and press Enter.

3
Check the results

Review C2:C8. Rows without a name return a blank result; rows with both values show a space between the name and surname.

4
Adjust the ranges

To include more rows, edit the formula in C2 and extend both ranges to the same ending row, such as A2:A20 and B2:B20.

Combine names row by row with MAP and LAMBDA
If you see #SPILL!: Clear any cells blocking the output range and make sure the formula is outside an Excel table. The formula returns an empty string for a missing name; it does not remove the output cell.
Combine names in WPS Spreadsheets

Combine names and surnames in WPS Spreadsheets

Use a standard IF formula in WPS Spreadsheets and fill it down to combine names while leaving rows with no name blank.

  1. 1. Open the workbook: Open WPS Spreadsheets and use Open to select your workbook.
  2. 2. Arrange the columns: Place names in column A and surnames in column B, starting in row 2.
  3. 3. Enter the formula: Click C2, enter =IF(A2="","",A2&IF(B2="",""," "&B2)), and press Enter.
  4. 4. Fill down: Select C2 and drag its fill handle down through the rows you want to combine.
  5. 5. Save the workbook: Use File > Save As and select XLSX if you want to keep the workbook in Excel format.
Combine names and surnames with a simple formulaLeave the result blank when the name cell is emptyOpen and edit Microsoft Excel XLSX filesUse a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

What replaces Google Sheets ARRAYFORMULA in Excel?

In a version of Excel that supports dynamic arrays, MAP with LAMBDA can process matching ranges row by row and spill the results from one formula.

Why does the Excel formula show #SPILL!?

The output range may contain existing data, or the formula may be inside an Excel table. Clear the cells below the formula or move it outside the table.

What happens if the surname is missing?

The formula returns the name alone, without adding a trailing space. If the name is missing, it returns an empty string even when a surname is present.

Will the formula automatically include new rows?

The example uses fixed ranges ending at row 8. Edit the formula in C2 to extend both ranges when you add rows, or fill the standard formula down to the new rows.