Function Problems

Excel: Place Duplicate Student Email Addresses Side by Side

Jason MillerJason Miller Nov 12, 2026 869 views

Question details

The user needs to group repeated student IDs and place all corresponding parent email addresses side by side in one row.

Product
Microsoft Excel
Device & OS
not provided
Scenario
A spreadsheet contains student IDs in column A and parent email addresses in column B. The goal is to create one row per student and return matching emails in separate columns.
Observed behavior
Multiple records for the same student are listed on separate rows instead of being combined horizontally.
Before you start

Confirm that student IDs are in A2:A100 and email addresses are in B2:B100, then choose an empty area for the unique student list and horizontally expanded email results.

Solution 1Recommended

Use UNIQUE, FILTER, and TRANSPOSE to arrange duplicate emails horizontally

Use this dynamic-array method when your Excel version supports UNIQUE and FILTER formulas.

Create a unique student list first, then use the student ID from that list to return every matching email address across the row. The result updates automatically when the source data changes within the referenced ranges.

1
Create a unique student list

Select an empty cell such as D2 and enter =UNIQUE(A2:A100), then press Enter. Excel spills one unique student ID into each row below D2.

2
Return matching emails across a row

In E2, enter =TRANSPOSE(FILTER($B$2:$B$100,$A$2:$A$100=D2,"")) and press Enter. Excel returns all email addresses matching the student ID in D2 into adjacent columns.

3
Fill the formula for each student

Copy the formula in E2 down beside the spilled student list, or enter it beside each student ID. Each row will display that student's matching email addresses from left to right.

Dynamic results: If your Excel version supports TOROW, you can use =TOROW(FILTER($B$2:$B$100,$A$2:$A$100=D2,""),1) instead of TRANSPOSE.

Arrange Duplicate Student Emails Side by Side in WPS Spreadsheet

WPS Spreadsheet can create a unique student list and spill matching email addresses horizontally with familiar dynamic-array formulas. It provides a lightweight workflow for organizing duplicate records while maintaining compatibility with common Excel workbook formats.

  1. 1. Open the workbook in WPS Spreadsheet: Launch WPS Office, choose Spreadsheet, and open the workbook containing the Student ID and Email columns.
  2. 2. Generate unique student IDs: In an empty cell such as D2, enter =UNIQUE(A2:A100) and press Enter to spill one row for each student.
  3. 3. Expand matching emails horizontally: In E2, enter =TRANSPOSE(FILTER($B$2:$B$100,$A$2:$A$100=D2,"")) and press Enter to place matching emails in adjacent columns.
  4. 4. Copy the formula down: Copy E2 down beside the unique student list so each student ID receives its own side-by-side email results.
Group duplicate student IDs and return matching email addresses across columns.Use familiar UNIQUE, FILTER, TRANSPOSE, and TOROW spreadsheet formulas.Open and save Microsoft Excel XLSX files with broad format compatibility.Work in a familiar spreadsheet interface with lightweight editing tools.
QA img-9

Frequently Asked Questions

How do I combine duplicate student IDs into one row in Excel?

Enter =UNIQUE(A2:A100) in an empty column to generate one row for each student ID. Then use a FILTER formula beside each ID to retrieve its matching email addresses.

What formula places all emails for one student in separate columns?

If the student ID is in D2, enter =TRANSPOSE(FILTER($B$2:$B$100,$A$2:$A$100=D2,"")) in E2. The matching email addresses will spill horizontally across the row.

Can I use TOROW instead of TRANSPOSE for this task?

Yes. In versions that support TOROW, use =TOROW(FILTER($B$2:$B$100,$A$2:$A$100=D2,""),1). The second argument ignores blank results.

Why does FILTER return an error or fail to spill?

Check that the source ranges have the same number of rows, that the formula area is empty, and that your Excel or WPS Spreadsheet version supports dynamic-array functions such as FILTER and UNIQUE.