Why does typing _ in a cell sometimes vanish? Why does copying text with underscores from Word break formatting in Excel? Why does the underscore appear in the formula bar but disappear in the cell display?
The underscore isn’t disappearing—it’s being interpreted as an underline formatting instruction. Excel treats it like a font effect, not a character—unless you tell it otherwise.
The Problem
You’re building a report for procurement tracking. Column A holds vendor codes. You need ACME_CORP_2024, but every time you type the underscore, Excel either hides it or underlines the next character. Worse: your colleague pasted Global_Tech_Services from Outlook—and now the first underscore shows, but the second doesn’t. What gives?
| Symptom | Cause | Fix |
|---|---|---|
| Underscore disappears after Enter | Cell formatted as "Underline" (Ctrl+U active) | Clear formatting: Ctrl+Shift+U or right-click → Format Cells → Font → Underline: (None) |
| Underscore appears only in formula bar, not cell | Font is set to "Symbol" or "Webdings" | Select cell → Home tab → Font dropdown → choose "Calibri" or "Arial" |
Pasted text shows partial underscores (e.g., ABC_DEF → ABCDEF) | Paste Special used "Match Destination Formatting" instead of "Keep Text Only" | Paste with Ctrl+Alt+V → select "Text" → OK |
Formula like =A1&"_"&B1 returns ABC _ DEF (with spaces) | Source cells contain trailing spaces; underscore gets padded | Wrap with =TRIM(A1)&"_"&TRIM(B1) (A1 = "ABC ", B1 = "DEF ") |
| Underscore renders as tiny dot or missing glyph | Font lacks underscore glyph (e.g., "MS UI Gothic", "Lucida Console") | Change font to "Segoe UI", "Calibri", or "Arial Unicode MS" |
The Solution
Do this—not that. There are exactly four reliable ways to add an underscore in Excel. Pick the one that matches your workflow.
- Type it with a preceding apostrophe: In cell A1, type
'ABC_DEF. The apostrophe forces text mode. The underscore displays. It stays visible even if you change font or alignment. Works in all versions, including Excel Online. - Use CHAR(95): In B1, enter
="ABC"&CHAR(95)&"DEF". CHAR(95) is the ASCII code for underscore. No formatting interference. Safe inside formulas, CONCAT(), TEXTJOIN(). - Paste as plain text: Copy
XYZ_2024from Notepad (not Word). PressCtrl+Alt+V→ select "Text" → click OK. Avoids font inheritance and rich-text artifacts. - Insert Symbol (for one-off cases): Go to Insert tab → Symbol → Subset: "ASCII", scroll to position 95 → double-click underscore → Insert. Use only when editing single cells—don’t automate this.
Here’s what clean output looks like after applying method #2 across 7 rows:
| Vendor ID | Year | Result (C1:C7) |
|---|---|---|
| Acme Corp | 2024 | =A2&CHAR(95)&B2 → Acme_Corp_2024 |
| TechNova Ltd | 2023 | =A3&CHAR(95)&B3 → TechNova_Ltd_2023 |
| Zephyr Solutions | 2024 | =A4&CHAR(95)&B4 → Zephyr_Solutions_2024 |
| Orion Dynamics | 2022 | =A5&CHAR(95)&B5 → Orion_Dynamics_2022 |
| Nexus Labs | 2024 | =A6&CHAR(95)&B6 → Nexus_Labs_2024 |
| Vista Group | 2023 | =A7&CHAR(95)&B7 → Vista_Group_2023 |
| Solis Innovations | 2024 | =A8&CHAR(95)&B8 → Solis_Innovations_2024 |
Going Further
Need more control? Here’s what most people miss.
If you’re generating file names (e.g., Report_Q3_2024.xlsx), wrap the whole string in TEXTJOIN:=TEXTJOIN("_",TRUE,A1,C1,YEAR(TODAY())) — handles blanks cleanly. No extra underscores.
For dynamic headers that update with data, use CONCATENATE + CHAR(95) inside a named range. Define Header_Base as ="Sales_"&TEXT(TODAY(),"yyyy-mm"). Then reference Header_Base in cell B1. Changes automatically.
Surprising tip: Underscores work fine in Data Validation lists—but only if the source list uses CHAR(95) or apostrophe-prefix. Plain typing fails there too.
Don’t use SUBSTITUTE to add underscores unless you’re replacing something. =SUBSTITUTE(A1," ","_") breaks on leading/trailing spaces. Always pair it with TRIM: =SUBSTITUTE(TRIM(A1)," ","_").
When NOT to Use This
Underscores aren’t always safe.
Avoid them in pivot table row labels if your source system treats ABC_DEF and ABC DEF as identical. Excel will group them together—even though they’re different strings.
Never use underscores in VLOOKUP lookup values if the table array contains mixed-case entries without consistent underscore usage. ABC_DEF ≠ abc_def — case sensitivity matters in exact match mode.
Don’t embed underscores in cell comments. They’ll render as underlines, not characters. Use hyphens or periods instead.
And never use CHAR(95) inside array formulas referencing entire columns (e.g., B:B). It bloats calculation time. Limit to ranges like B2:B1000.
Keyboard Shortcuts
| Action | Shortcut | Notes |
|---|---|---|
| Clear underline formatting | Ctrl+Shift+U | Toggles underline OFF only. Does not affect other font styles. |
| Paste as plain text | Ctrl+Alt+V, then T | After Ctrl+Alt+V, press T to select "Text" instantly. |
| Open Symbol dialog | Alt+N+U | Alt → N (Insert tab) → U (Symbol). Then navigate with arrow keys. |
| Toggle formula view | Ctrl+` (backtick) | See actual formulas (like =CHAR(95)) instead of results. |
| Apply Calibri font | Alt+H+FF | Alt → H (Home) → FF (Font dropdown) → type c for Calibri. |