How to Concatenate in Excel and Add a Dash

Formulas & functions · Updated November 20, 2026

To join two cell values with a dash in Excel, enter =A2&"-"&B2 in a result cell, replacing A2 and B2 with the cells you want to combine. For example, if A2 contains AB and B2 contains 123, the result is AB-123. This works in Microsoft Excel for Microsoft 365 on Windows, and the same formula works in Excel for Mac and Excel for the web.

What You’ll Need

  • An Excel workbook with the pieces of text or values you want to join, preferably in separate cells.
  • A blank cell for the combined result. If you plan to use the formula for multiple rows, leave room to copy it down.
  • The cell addresses for the values and a decision about where the dash should go. The examples below assume English-language Excel formula separators.

Step-by-Step

  1. Check the cells you want to join. For the first example, put AB in A2 and 123 in B2. Decide whether the dash belongs between the two values, at the beginning, or at the end. This guide puts it between them. Keeping the original values in separate cells means you can revise or reuse them without retyping the combined result.
  2. Select the result cell. Click C2, or another empty cell where you want the combined value to appear. With AB in A2 and 123 in B2, entering the formula =A2&"-"&B2 in C2 returns AB-123. The ampersands join the three pieces—A2, a literal hyphen, and B2—in order. The dash must be inside quotation marks because it is a character you want Excel to insert, not a cell reference or subtraction operation.
  3. Enter and confirm the formula. Type the formula in the formula bar or directly in the selected cell, then press Enter. Check the result against the source cells: AB followed by a hyphen and then 123 should read AB-123. If Excel displays the formula itself instead of its result, check the troubleshooting section below; the result cell may be formatted as Text.
  4. Use CONCAT if you prefer a function. The ampersand approach is short, but Excel also has the CONCAT function. With AB in A2 and 123 in B2, enter =CONCAT(A2,"-",B2) in C2; it returns AB-123. The arguments are listed in joining order, and the quoted hyphen is a separate argument. CONCAT can take more than two cell references or text values. It does not add a separator automatically, so include the dash as shown.
  5. Join three or more pieces. You can repeat the ampersand and dash between each pair of values. If A2 contains 2026, B2 contains 11, and C2 contains 03, enter =A2&"-"&B2&"-"&C2 in D2. The result is 2026-11-03: the three values are joined with two dashes. Add another ampersand and quoted dash for every additional separator you need. This creates text; it does not turn the result into an Excel date.
  6. Copy the formula down if you have more rows. Click the cell containing the formula and point to the small square at its lower-right corner, called the fill handle. Drag it down the rows you need. If the first formula is in C2, Excel normally adjusts its references to A3 and B3 in the next row, then A4 and B4, and so on. Review a few results to make sure each row is paired correctly. In Excel for Mac and the web, the fill handle works in the same way, although the cursor appearance can vary.
  7. Keep the formula or save a fixed text result. Leave the formula in place if the combined value should update when the source cells change. If you need a static result, copy the result cells and use Home > Paste > Paste Values. This replaces the formulas with their displayed text, so later edits to the original cells will not update those pasted values. Save the workbook after confirming that the results are correct.

Common Mistakes

Leaving out quotation marks around the dash: A hyphen you want to display must be written as a text value, such as "-". Without quotation marks Excel may interpret it as a minus sign or report a formula error. Conversely, do not put quotation marks around a cell reference: A2 should refer to the cell, while “A2” would display the letters A2.

Expecting Excel to add a separator: The ampersand and CONCAT join values exactly as specified. They do not insert punctuation, spaces, or dashes on their own. Add each separator explicitly between the references. If you put the dash after the final reference, the output will end with a dash rather than placing it between the parts.

Ignoring spaces or blank cells: A cell that looks empty may contain a space, and leading or trailing spaces in either source value remain in the result. A blank second cell in the basic formula can leave a trailing dash, such as AB-. Check the source cells before assuming the formula is at fault.

Forgetting number formatting: Concatenation uses a number’s underlying value, not necessarily its visible formatting. A code displayed as 007 may be stored as the number 7, so a basic join can produce 7 and lose the leading zeros. Dates and percentages can also appear as serial numbers or unformatted values when joined directly.

Tips

Use the ampersand for a small, readable formula, and CONCAT when you want to list multiple pieces as function arguments. Both are suitable for ordinary text joining. If you need one delimiter between a range of cells and want empty cells ignored, TEXTJOIN is more convenient. TEXTJOIN is available in Excel for Microsoft 365 and newer perpetual Excel releases, including Excel 2019 and later.

With AB in A2 and B2 blank, =TEXTJOIN("-",TRUE,A2:B2) returns AB, without adding a spare dash. The first argument is the delimiter, TRUE tells Excel to ignore empty cells, and A2:B2 is the range to join. A cell containing a space is not empty, however, so it may still affect the result. Use a consistent pattern in your data and keep an untouched copy of source columns if the combined output will be used for importing or reporting.

If you are combining identifiers, decide whether leading zeros are meaningful before joining. With AB in A2 and the number 7 in B2, =A2&"-"&TEXT(B2,"000") returns AB-007. TEXT applies a three-digit display pattern to B2. This is useful for codes, but choose a pattern that matches your actual identifier length rather than applying it blindly to ordinary numbers.

Troubleshooting

The cell shows the formula instead of the answer: Select the cell and check Home > Number Format. If it is set to Text, change it to General, then press F2 and Enter to make Excel evaluate the formula again. Also check whether Show Formulas is enabled on the Formulas tab. The Windows shortcut Ctrl+` toggles that view; on many Mac keyboards, Control+` does the same, though the key position and availability depend on the keyboard layout.

Excel reports a formula problem: Confirm that the formula begins with an equals sign, that each pair of quotation marks is balanced, and that cell references point to existing cells. In the examples, the dash is enclosed in straight double quotation marks. If your Excel installation uses a regional setting that expects semicolons between function arguments, CONCAT or TEXTJOIN may need semicolons instead of commas; the ampersand formula has no function-argument separators.

The output has an unexpected space, dash, or missing value: Click each source cell and inspect its contents in the formula bar. Remove unwanted spaces from the source or correct the formula’s order. A basic join deliberately includes a dash even when one of its cells is blank. If you want empty cells skipped, use TEXTJOIN as described above, and check that the allegedly blank cells do not contain spaces.

A date or number looks wrong: Directly joining a number may show its stored value rather than the formatting you see in the source cell. For a date, format it explicitly with TEXT. If A2 contains the Excel date November 3, 2026, =TEXT(A2,"yyyy-mm-dd") returns 2026-11-03. This formats the date as text in year-month-day order. Confirm that A2 is a real Excel date; if it is text in an inconsistent format, the result may not behave as expected.

The formula works in one row but not another: Check whether the references shifted as intended when you copied the formula. Relative references such as A2 and B2 adjust automatically down a column. If the formula points to the wrong source row, edit the first formula and refill it. If you need to keep a particular reference fixed while copying, add dollar signs to that reference, for example $A$2; use this only when every copied result should refer to that same cell.

Frequently Asked Questions

What is the simplest way to concatenate two cells with a dash?
Use the ampersand operator and put the dash in quotation marks. For example, with the values in A2 and B2, enter =A2&"-"&B2. It joins the first cell, a literal hyphen, and the second cell.

Can I use CONCAT instead of the ampersand?
Yes. CONCAT joins the listed references and text arguments in order. Include the dash as its own quoted argument, because CONCAT does not insert a delimiter automatically. Both approaches produce the same result for this basic task.

How do I put a dash between several cells?
Place a quoted dash between each pair of references, such as A2, B2, and C2. For a longer range where empty cells should be ignored, TEXTJOIN can apply one delimiter across the range. Check the result carefully if some cells contain spaces rather than being truly empty.

How can I keep zeros at the start of a number?
If the value is a code with a fixed number of digits, use TEXT with an appropriate pattern before joining it. For instance, a three-digit pattern turns the numeric value 7 into 007. Alternatively, store the code as text from the start if it is not meant to be used in arithmetic.

Will the combined result update when I edit the source cells?
Yes, as long as the result remains a formula and Excel is calculating normally. If you paste the result as values, it becomes fixed text and will not change when the original cells change. Use the formula version for a live link between the cells.

Does the formula work on Mac or Excel for the web?
Yes. The ampersand and CONCAT formulas work in Excel for Microsoft 365 on Windows, Excel for Mac, and Excel for the web. Ribbon placement can vary slightly by platform, but the formula syntax and basic cell references are the same.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.