Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Concatenate Two Numbers in Excel

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To concatenate two numbers in Excel, use the ampersand operator: if 12 is in A1 and 34 is in B1, type =A1&B1 in another cell and press Enter. The result is the text string 1234. The CONCATENATE function does the same job (=CONCATENATE(A1,B1)), and the newer CONCAT and TEXTJOIN functions work too. The one thing to watch is that concatenation always produces text, not a number, so formatting and any arithmetic you want to do afterwards need a little thought. The steps below cover both methods, how to keep leading zeros and decimals intact, and what to do when the result looks wrong.

What You'll Need

  • Excel on Windows, Mac, or Excel for the web (the ampersand operator and CONCATENATE work in all of them).
  • Two cells containing the numbers you want to join, or the numbers typed directly into the formula.
  • An empty cell for the result, so you do not overwrite your source data.

Step-by-Step

  1. Put your numbers in separate cells. For example, type 12 in A1 and 34 in B1. Keeping them apart makes the formula easy to read and easy to change later.
  2. Click the cell where you want the joined result. Pick a cell outside the two you are combining, such as C1.
  3. Type an equals sign to start the formula. Every formula in Excel begins with =.
  4. Reference the first cell, then the ampersand, then the second cell. Type =A1&B1 and press Enter. The cell now shows 1234 as text.
  5. Alternatively, use the CONCATENATE function. Type =CONCATENATE(A1,B1) and press Enter. Commas separate the arguments, and you can add more cells if you need to join three or more numbers.
  6. Add a separator if you want one. To join 12 and 34 as "12-34", type =A1&"-"&B1. Any text between quotation marks is inserted literally, so a space, dash, slash, or comma all work the same way.
  7. Join numbers typed directly into the formula. If you do not want to use cells, type ="12"&"34". Without the quotation marks Excel would try to add the numbers instead of joining them.
  8. Preserve leading zeros or fixed decimal places with TEXT. If A1 holds 007 and B1 holds 34, plain concatenation returns 734 because Excel treats 007 as the number 7. Use =TEXT(A1,"000")&TEXT(B1,"00") to get 00734. For decimals, a format code like "0.00" keeps two decimal places.
  9. Copy the formula down if you have a list. Drag the fill handle from the corner of the result cell, or copy and paste it into the cells below. Relative references adjust automatically for each row.
  10. Convert the result to a real number if you need arithmetic. Concatenation always returns text, so =A1&B1+1 will not behave as you expect. Wrap the result in VALUE, as in =VALUE(A1&B1), or use the number directly in a separate calculation.

Common Mistakes

  • Using a plus sign instead of an ampersand. =A1+B1 adds the numbers; it does not join them. Use & for concatenation.
  • Forgetting quotation marks around literal text. ="12"&"34" joins two text values. =12&34 also works, but =12-34 subtracts. Quotation marks make your intent clear.
  • Losing leading zeros. Any number stored as a number drops leading zeros. Use the TEXT function with a format code, or store the value as text by typing an apostrophe before it.
  • Expecting a number back. The result of concatenation is text, even when it looks like a number. It will be left-aligned by default, and it will not work in SUM or AVERAGE until converted with VALUE.
  • Overwriting source cells. If you put the formula in A1 itself, you create a circular reference. Always use a separate cell.
  • Missing separators. Joining first and last names or two ID parts without a space or dash produces a run-together string that is hard to read and hard to split later.

Tips

  • Use TEXTJOIN when you have many values and want one separator between all of them, for example =TEXTJOIN("-",TRUE,A1,B1,C1). The TRUE argument ignores empty cells.
  • CONCAT is the newer replacement for CONCATENATE and accepts ranges, such as =CONCAT(A1:B1). CONCATENATE still works for backward compatibility.
  • If you plan to split the joined value later, choose a separator that does not appear inside the numbers, such as a pipe or a dash.
  • Format the result cell as Text before entering the formula if you want to keep it as a string, or leave it as General and convert with VALUE only when needed.
  • Press Ctrl+` (the grave accent) to toggle formula view and check exactly what each cell contains.

Troubleshooting

The result shows #VALUE!. One of the referenced cells probably contains an error value or an unexpected character. Click the cell and check the formula bar, then remove the bad reference.

The result is a formula instead of a value. The cell is likely formatted as Text. Select it, set the format to General, then re-enter the formula by pressing F2 and Enter.

The numbers are being added instead of joined. You used a plus sign. Replace it with an ampersand.

Leading zeros disappeared. The source cell is stored as a number. Apply the TEXT function with a format code, or retype the value with a leading apostrophe to store it as text.

The formula copied down gives the same result in every row. The references are absolute (with dollar signs). Remove the dollar signs so they adjust per row.

Decimals look wrong. Excel may round the display. Use TEXT with a format code such as "0.00" to control exactly how many decimal places appear.

If that did not work, rebuild the formula one piece at a time: start with =A1, confirm it shows the right value, then add &B1. This isolates which reference is causing the problem.

Frequently Asked Questions

What is the difference between & and CONCATENATE?

They do the same job. The ampersand is shorter and easier to read for two or three values; CONCATENATE is clearer when you have several arguments. Both return text.

Can I concatenate numbers without turning them into text?

No. Concatenation always produces a text string. If you need a number for calculation, wrap the result in VALUE or perform the arithmetic separately.

How do I keep leading zeros when joining numbers?

Use the TEXT function with a format code that matches the length you need, for example =TEXT(A1,"000")&TEXT(B1,"000"). Alternatively, store the source values as text by typing an apostrophe first.

How do I add a space or dash between the numbers?

Put the separator in quotation marks between the ampersands: =A1&" "&B1 for a space, or =A1&"-"&B1 for a dash.

Why does my concatenated result look left-aligned?

Because it is text. Excel left-aligns text and right-aligns numbers by default. This is normal and confirms the formula worked.

Can I concatenate a whole range at once?

Yes, with CONCAT or TEXTJOIN. CONCAT accepts a range like =CONCAT(A1:B1), and TEXTJOIN lets you specify a delimiter and ignore blanks. CONCATENATE itself requires each cell listed individually.