How to combine data in two columns in excel
Tutor 5 (54 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
To combine data in two columns in Excel, use one of these common methods: the ampersand operator (&), the CONCAT/CONCATENATE functions, TEXTJOIN (when you need a delimiter and to skip blanks), Flash Fill, Power Query, or a short VBA macro. Choose the method that fits your Excel version and the shape of your data.
Method 1 — Use & (simple and universal)
Use & to join two cells with or without a separator.
-
In the cell where you want the combined text, type:
=A2 & B2
-
To add a space between values, type:
=A2 & " " & B2
-
Press Enter, then drag the fill handle down to copy the formula.
Method 2 — Use CONCAT or CONCATENATE
Use CONCAT in recent Excel versions, or CONCATENATE in older workbooks.
-
For recent Excel:
=CONCAT(A2, " ", B2)
-
For older Excel:
=CONCATENATE(A2, " ", B2)
-
Press Enter and fill down.
Method 3 — Use TEXTJOIN (skip blanks and use a delimiter)
Use TEXTJOIN when you want a delimiter (comma, space) and to ignore empty cells.
-
Example that joins with a space and ignores blanks:
=TEXTJOIN(" ", TRUE, A2, B2)
-
Press Enter and copy down.
Method 4 — Flash Fill (fast pattern-based fill)
Use Flash Fill when the combined result follows an obvious pattern.
-
In the first result cell next to your data, type the desired combined result (for example
John Smith). -
Select the cells you want filled or put the active cell in the next row and press:
-
Windows:
Ctrl+E -
Mac:
Cmd+E(availability depends on Excel version)
-
-
Excel fills the column based on the pattern you provided.
Method 5 — Power Query (best for large data or repeated transforms)
Power Query merges columns into a new column without formulas and is ideal for repeated ETL tasks.
-
Select your table or data range and choose Data → From Table/Range.
-
In Power Query Editor, select the two columns (use Ctrl+click).
-
Right-click a selected column header → Merge Columns.
-
Choose a separator (space, comma, custom) and a name for the new column.
-
Click Close & Load to return the transformed table to the worksheet.
Method 6 — VBA macro (automate combining into a new column)
Use this when you want a one-click automation.
-
Press
Alt+F11to open the VBA editor (Windows) or Developer → Visual Basic (Mac). -
Insert a Module and paste:
Sub CombineTwoColumns()
Dim ws As Worksheet
Dim lastRow As Long
Set ws = ActiveSheet
lastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row
Dim i As Long
For i = 2 To lastRow
ws.Cells(i, "C").Value = ws.Cells(i, "A").Value & " " & ws.Cells(i, "B").Value
Next i
End Sub
-
Run the macro to put combined values in column C.
What if I need to skip empty cells when combining?
To combine two cells but ignore an empty one, use conditional formulas or TEXTJOIN.
-
Using
TEXTJOIN:=TEXTJOIN(" ", TRUE, A2, B2)
-
Using
&with conditional logic:=IF(A2="", B2, IF(B2="", A2, A2 & " " & B2))
How to preserve leading zeros or specific number formats when combining?
To keep leading zeros or apply formatting, convert numbers to text with TEXT().
-
Preserve a ZIP code from A2 when A2 is numeric:
=TEXT(A2, "00000") & " " & B2
-
Format a date in A2 before combining:
=TEXT(A2, "mm/dd/yyyy") & " - " & B2
How to combine many columns or entire ranges into one cell?
Use TEXTJOIN for many columns or a dynamic range.
-
To join A2:E2 with commas and skip blanks:
=TEXTJOIN(", ", TRUE, A2:E2)
How to output combined values as static text (remove formulas)
To replace formulas with values:
-
Select the combined column.
-
Press
Ctrl+C. -
Right-click → Paste Special → Values.
What are the important version differences between Windows and Mac?
On modern Excel for both Windows and Mac (Office 365 or Excel 2019+), CONCAT, TEXTJOIN, and Flash Fill are available. Older Excel versions may lack TEXTJOIN and CONCAT; CONCATENATE and & work everywhere. Flash Fill was introduced earlier on Windows; Mac versions gained similar features later. Power Query is fully featured in Windows; Mac support has improved, but can vary by release. Use simple formulas for maximum cross-platform compatibility.
Which method should I choose?
-
Use
&orCONCATfor simple, universal needs. -
Use
TEXTJOINwhen you need a delimiter and to skip blanks. -
Use Flash Fill for quick one-off pattern-based combinations.
-
Use Power Query for repeatable, large-scale transformations.
-
Use VBA when you need automation across many sheets or workbooks.
Troubleshooting tips
-
When results look like numbers but appear truncated, check cell formatting and widen the column.
-
When leading zeros disappear, wrap numeric cells with
TEXT()and a format mask. -
When formulas return
#NAME?, ensure function names are available in your Excel version and spelled correctly. -
When Flash Fill does not work, verify the pattern is clear and that Excel’s Flash Fill option is enabled in Options.
Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
Why are margins not working
Answers · 1
Why is page layout not working
Answers · 1
How to print repeated rows on top in excel
Answers · 1
How to print header on each page
Answers · 1