How to Prevent Excel Formula Hyphens from Creating Line Breaks in Word
Question details
The user needs a way to stop hyphens in Excel formulas from acting as line break points when the formulas are pasted into a Word document.

- Product
- Microsoft Word / WPS Writer
- Device & OS
- not provided
- Scenario
- Pasting Excel formulas containing minus signs (hyphens) into text documents for reporting or professional presentation.
- Observed behavior
- Standard hyphens trigger natural line wrapping in Word, causing formulas to awkwardly split across multiple lines when near the margin.
Before applying this fix, be aware that replacing formula hyphens with non-breaking hyphens changes the character type. Keep a backup of the original document if you intend to copy the formulas back into a spreadsheet program later.
Use Find and Replace to Insert Non-Breaking Hyphens
Convert standard hyphens into non-breaking hyphens to force Word to keep the formula elements together on a single line.
A non-breaking hyphen is a special character that prevents text from wrapping at the hyphen's location. By using Word's Find and Replace feature, you can quickly apply this cosmetic fix to all formulas in your document.
In your Word document, locate a pasted formula that has split across lines, highlight the hyphen causing the break, and copy it to your clipboard.
Press the Ctrl+H keyboard shortcut to immediately open the Find and Replace dialog box.
Paste the copied hyphen into the 'Find what' text box. Click into the 'Replace with' text box and type ^~ (a caret followed by a tilde), which is Word's special code for a non-breaking hyphen.
Click the 'Replace All' button. Word will swap the standard hyphens for non-breaking ones, instantly fixing the unwanted line breaks.

Format Formulas Perfectly with WPS Writer
WPS Writer offers advanced layout controls and robust Find and Replace tools, making it exceptionally easy to manage complex formatting like non-breaking characters when working with pasted spreadsheet data.
- 1. Paste Your Data: Copy your formulas from WPS Spreadsheet and paste them directly into your WPS Writer document.
- 2. Access Find and Replace: Navigate to the Home tab and click on Find and Replace, or press Ctrl+H.
- 3. Swap to Non-breaking Hyphens: Type a standard hyphen in the 'Find what' box, type ^~ in the 'Replace with' box, and click Replace All.

Frequently Asked Questions
What is a non-breaking hyphen?
A non-breaking hyphen is a special formatting character that links words or numbers together, preventing the word processor from splitting them across two lines at the margin.
Can I manually insert a non-breaking hyphen without Find and Replace?
Yes. You can manually insert a single non-breaking hyphen exactly where you need it by pressing Ctrl+Shift+Hyphen on Windows (or Command+Shift+Hyphen on a Mac).
Why do formulas automatically split at hyphens in Word?
Word processors treat standard hyphens as acceptable line-break points for text wrapping. When a long string of text or a formula reaches the margin, the software automatically wraps the text after the hyphen to keep the layout within the page boundaries.
Will these formulas still work if I paste them back into Excel?
No, they will not calculate correctly. Spreadsheet programs do not recognize the non-breaking hyphen character as a mathematical minus sign. You must use standard hyphens for functional formulas in spreadsheets.




