How to reverse text string or words order in Excel?
When you use the Excel worksheet, how do you reverse the text string or words order in Excel? For example, you want to reverse “Excel is a useful tool for us” to “su rof loot lufesu a si lecxE”. Or sometimes you may reverse the words order such as “Excel, Word, PowerPoint, OneNote” to “OneNote, PowerPoint, Word, Excel”. Normally this is somewhat difficult to solve this problem. Please look at the following methods:
Reverse text string with User Defined Function
Reverse words order separated by specific separator with VBA code
Reverse text string or words order with Kutools for Excel quickly and easily
Comparison of Methods for Reversing Text Strings or Word Order in Excel
Excel can reverse text character by character or reverse the order of words and items separated by specific characters. VBA/User Defined Functions can handle these tasks with custom code, while Kutools for Excel's Reverse Text Order provides both types of reversal through a single visual tool.
| Comparison | VBA / User Defined Function | Kutools Reverse Text Order |
|---|---|---|
| Reversal type | Different code is used to reverse individual characters or reverse the order of separated words/items | Supports both character-by-character reversal and word/item order reversal in one tool |
| Separator support | The word-order VBA allows you to specify the separator used in the text | Choose the appropriate separator directly in the dialog for spaces or other specific characters |
| Setup | Open the VBA editor, insert a module, add the required code, and then run the macro or use the custom function | Select the cells, open Reverse Text Order, choose the appropriate separator option, preview the result, and apply |
| Best for | Custom text-reversal solutions when VBA is acceptable | Quickly reversing text strings or separated words/items without creating or modifying VBA code |
Reverse text string with User Defined Function
Supposing you have a range of text strings which you want to reverse, such as “add leading zeros in Excel” to “lecxE ni sorez gnidael dda”. You can reverse the text with following steps:
1. Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.
2. Click Insert > Module, and paste the following macro in the Modulewindow.
Function Reversestr(str As String) As String
Reversestr = StrReverse(Trim(str))
End Function
3. And then save and close this code, go back to the worksheet, and enter this formula: =reversestr(A2) into a blank cell to put the result, see screenshot:

4. Then drag the fill handle down to copy this formula, and the text in the cells is revered at once, see screenshot:


Unlock Excel Magic with Kutools AI
- Smart Execution: Perform cell operations, analyze data, and create charts—all driven by simple commands.
- Custom Formulas: Generate tailored formulas to streamline your workflows.
- VBA Coding: Write and implement VBA code effortlessly.
- Formula Interpretation: Understand complex formulas with ease.
- Text Translation: Break language barriers within your spreadsheets.
Reverse words order separated by specific separator with VBA code
If you have a list of cell words which are separated by commas as this “teacher, doctor, student, worker, driver”, and you want to reverse the words order like this “drive, worker, student, doctor, teacher”. You can also use follow VBA to solve it.
1. Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.
2. Click Insert > Module, and paste the following macro in the Module window.
Sub ReverseWord()
'Updateby Extendoffice
Dim Rng As Range
Dim WorkRng As Range
Dim Sigh As String
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
Sigh = Application.InputBox("Symbol interval", xTitleId, ",", Type:=2)
For Each Rng In WorkRng
strList = VBA.Split(Rng.Value, Sigh)
xOut = ""
For i = UBound(strList) To 0 Step -1
xOut = xOut & strList(i) & Sigh
Next
Rng.Value = xOut
Next
End Sub 3. Then press F5 key, a dialog is displayed, please select a range to work with. See screenshot:

4. And then press Ok, another dialog is popped out for you to specify the separator that you want to reverse the words based on, see screenshot:

5. Then click OK, and you can see the words selected are reversed, see screenshots:
![]() | ![]() | ![]() |
Reverse text string or words order with Kutools for Excel quickly and easily
The Kutools for Excel’s Reverse Text Order can help you quickly and conveniently to reverse various text strings. It can do following operations:
Reverse the text from right to left, such as “tap some words” to “sdrow emos pat”;
Reverse the text from right to left:
1. Select the range that you want to reverse.
2. Click Kutools > Text Tools > Reverse Text Order, see screenshot:

3. In the Reverse Text dialog box, select the proper option from Separator which are corresponding with the cell values. And you can preview the results from the Preview Pane. See screenshot:

Download and free trial Kutools for Excel Now !
Reverse the text are separated by space or other specific characters:
This feature also can help you to reverse the text strings which are separated by specific characters.
1. Select the cells and apply this utility by clicking Kutools > Text > Reverse Text Order.
2. In the Reverse Text dialog box, choose the separator which separate the cell values that you want to reversed the words based on, see screenshot:

3. Then click Ok or Apply, the words in the cells have been reversed at once. See screenshots:
![]() | ![]() | ![]() |
Note:Checking Skip non-text cells to prevent you reversing the numbers in selected range.
Download and free trial Kutools for Excel Now !
Conclusion
VBA / User Defined Functions provide flexible ways to reverse text in Excel. A User Defined Function can reverse an entire text string character by character, while a separate VBA macro can reverse the order of words or items based on a specified separator. However, these tasks require different pieces of VBA code and additional setup.
Kutools for Excel's Reverse Text Order combines both operations in one visual tool. It can reverse an entire text string character by character or reverse the order of words and items based on spaces or other specified separators. The Preview Pane lets you check the result before applying it, making it a convenient alternative when you want to handle different text-reversal tasks without VBA.
Related article:
How to flip the first and last name in cells in Excel?
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
All Kutools add-ins. One installer
Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.
- All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
- One installer, one license — set up in minutes (MSI-ready)
- Works better together — streamlined productivity across Office apps
- 30-day full-featured trial — no registration, no credit card
- Best value — save vs buying individual add-in




