Data Import & Export

Split Comma-Separated Contacts and Look Up Phone Numbers in Excel

Phi Hung VoPhi Hung Vo Nov 18, 2026 871 views

Question details

Separate comma-delimited contact data and retrieve the phone number or email associated with a selected name.

Split Comma-Separated Contacts and Look Up Phone Numbers in Excel
Product
Microsoft Excel for Microsoft 365
Device & OS
not provided
Scenario
Names, phone numbers, and email addresses are stored as comma-separated lists that need to be converted into a lookup table.
Observed behavior
Each contact should occupy one row, with the matching phone number and email available for lookup by name.
Before you start

Check that the names, phone numbers, and emails are in the same order and that each list has the same number of entries. The Excel example assumes names are in B3, phone numbers in C3, and emails in D3, with empty space for the results.

Solution 1Recommended

Split the contact lists and use XLOOKUP in Microsoft 365

Use dynamic array formulas to create a contact table from one set of comma-separated lists and look up a name.

This example requires Excel functions including TEXTSPLIT, HSTACK, CHOOSECOLS, and XLOOKUP. Each list must have the same number of entries in matching order.

1
Create the contact table

Select H3 and enter =HSTACK(TRIM(TRANSPOSE(TEXTSPLIT(B3,","))),TRIM(TRANSPOSE(TEXTSPLIT(C3,","))),TRIM(TRANSPOSE(TEXTSPLIT(D3,",")))). The results spill into three columns for names, phone numbers, and emails.

2
Enter a name

Type the name to find in K3. Use the spelling shown in the first column of the spilled table.

3
Look up the phone number

In L3, enter =XLOOKUP(K3,CHOOSECOLS(H3#,1),CHOOSECOLS(H3#,2),"Not found").

4
Look up the email

In M3, enter =XLOOKUP(K3,CHOOSECOLS(H3#,1),CHOOSECOLS(H3#,3),"Not found").

5
Add other source rows

For another set of lists, repeat the formula in a separate empty area and change B3, C3, and D3 to the corresponding source cells. Combine the resulting contact rows into one table if you need to search all sets together.

Split the contact lists and use XLOOKUP in Microsoft 365
Check duplicate names: XLOOKUP returns the first matching name. If names are duplicated, use an additional identifier to distinguish the contacts.
Work with contacts in WPS Spreadsheets

Split and look up contacts in WPS Spreadsheets

Use Text to Columns to separate contact lists, transpose them into a table, and use VLOOKUP to retrieve a phone number or email.

  1. 1. Prepare the lists: Open the workbook in WPS Spreadsheets. For a three-contact example, copy the names, phone numbers, and emails into A6, A7, and A8 respectively, leaving the cells to their right empty.
  2. 2. Remove delimiter spaces: Select A6:A8 and press Ctrl+H. Find a comma followed by a space, replace it with a comma, and choose Replace All.
  3. 3. Split each list: Select A6 and choose Data > Text to Columns. Choose a comma delimiter and finish the wizard, then repeat for A7 and A8. For phone numbers, choose Text as the column data format in the wizard so leading zeros are preserved.
  4. 4. Build the contact table: Copy A6:C6, select A12, and use Home > Paste > Paste Special > Transpose. Repeat with A7:C7 into B12 and A8:C8 into C12. For a different number of contacts, extend the copied ranges to include all split cells.
  5. 5. Find contact details: Enter a name in F12. Enter =VLOOKUP(F12,A12:C14,2,FALSE) in G12 for the phone number and =VLOOKUP(F12,A12:C14,3,FALSE) in H12 for the email. Adjust the table range if it contains more or fewer contacts.
Separate comma-delimited contact lists into individual cellsLook up phone numbers and emails by nameOpen and edit Microsoft Excel XLSX filesUse familiar spreadsheet tools in a free office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why does the Excel split formula show a spill error?

The formula in H3 needs empty cells below and to its right. Clear any cells blocking the spill range and check that the formula is not inside an Excel table.

How do I keep leading zeros in phone numbers?

Keep phone numbers as text when importing or splitting them. In the WPS Text to Columns wizard, select Text as the column data format for the phone number fields.

What if the lists contain different numbers of entries?

Check the source cells and correct the missing or extra entries before splitting. Names, phone numbers, and emails must have matching positions for the resulting rows to be reliable.

Can I use Power Query for recurring contact imports?

Yes. In Excel, open Data > From Table/Range, use Split Column > By Delimiter to separate the comma-delimited values, and reshape the results into one row per contact before loading the table. You can then use XLOOKUP against the loaded columns.

What happens when two contacts have the same name?

XLOOKUP and an exact-match VLOOKUP return the first match. Add a unique identifier to the contact table if you need to distinguish people with the same name.