Combine Names and Surnames with Excel Dynamic Array Formulas
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.

- 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.
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.
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.
Click C2, outside any Excel table, and make sure C2:C8 is empty so the results have room to spill.
In C2, enter =MAP(A2:A8,B2:B8,LAMBDA(name,surname,IF(name="","",name&IF(surname="",""," "&surname)))) and press Enter.
Review C2:C8. Rows without a name return a blank result; rows with both values show a space between the name and surname.
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.

Fill a standard formula down in older Excel versions
Use a row-by-row formula if your version of Excel does not support MAP or dynamic arrays.
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. Open the workbook: Open WPS Spreadsheets and use Open to select your workbook.
- 2. Arrange the columns: Place names in column A and surnames in column B, starting in row 2.
- 3. Enter the formula: Click C2, enter =IF(A2="","",A2&IF(B2="",""," "&B2)), and press Enter.
- 4. Fill down: Select C2 and drag its fill handle down through the rows you want to combine.
- 5. Save the workbook: Use File > Save As and select XLSX if you want to keep the workbook in Excel format.

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.




