Skip to main content

Reverse the text string in a cell in Excel

This article explains a formula combining the TEXTJOIN and MID functions to reverse text string order in a cell in Excel.


How to reverse the text string in a cell in Excel?

Generic formula

=TEXTJOIN("",1,MID(text_string,{10,9,8,7,6,5,4,3,2,1},1)

Arguments

Text_string: The text string you want to reverse the order. It can be:

  • 1. The text enclosed in quotation marks;
  • 2. Or a reference to a cell containing the text.

How to use this formula?

1. Select a blank cell to output the reversed result.

2. Enter the below formula into it and press the Enter key, and then drag the Fill Handle to apply the formula to other cells.

=TEXTJOIN("",1,MID(B5,{10,9,8,7,6,5,4,3,2,1},1))

Tips: You can replace the number 1 with TRUE in the formula. It means that empties in the array will be ignored.

How this formula works?

=TEXTJOIN("",1,MID(B5,{10,9,8,7,6,5,4,3,2,1},1))

  • 1. MID(B5,{10,9,8,7,6,5,4,3,2,1},1): The MID function extracts each character of text string in B5 in reverse order. Here the result is {"","","","","","l","e","c","x","E"};
  • 2. TEXTJOIN("",1,{"","","","","","l","e","c","x","E"}): The TEXTJOIN function join each character in the array and ignore the empties. The final result will be “lecxE”.

Note: The above formula works correctly if the length of the text string is equal to or less than 10 characters. To reverse the text string which length is greater than 10 characters, please apply the following array formula:
=TEXTJOIN("",1,MID(A1,ABS(ROW(INDIRECT("1:"&LEN(A1)))-(LEN(A1)+1)),1))
Please remember to press Ctrl + Shift +Enter keys together to get the correct result.


Related functions

Excel TEXTJOIN function
The Excel TEXTJOIN function joins multiple values from a row, column or a range of cells with specific delimiter.

Excel MID function
MID function is used to find and return a specific number of characters from the middle of given text string.


The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates  |  Delete Blank Rows  |  Combine Columns or Cells without Losing Data  |  Round without Formula ...
Super VLookup: Multiple Criteria  |  Multiple Value  |  Across Multi-Sheets  |  Fuzzy Lookup...
Adv. Drop-down List: Easy Drop Down List  |  Dependent Drop Down List  |  Multi-select Drop Down List...
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  Compare Columns to Select Same & Different Cells ...
Featured Features: Grid Focus  |  Design View  |  Big Formula Bar  |  Workbook & Sheet Manager | Resource Library (Auto Text)  |  Date Picker  |  Combine Worksheets  |  Encrypt/Decrypt Cells  |  Send Emails by List  |  Super Filter  |  Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters ...)  |  50+ Chart Types (Gantt Chart ...)  |  40+ Practical Formulas (Calculate age based on birthday ...)  |  19 Insertion Tools (Insert QR Code, Insert Picture from Path ...)  |  12 Conversion Tools (Numbers to Words, Currency Conversion ...)  |  7 Merge & Split Tools (Advanced Combine Rows, Split Excel Cells ...)  |  ... and more

Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...

Description


Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
Comments (3)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hello,
works almost perfectly thank you,
but if the string is longer than 10, you could use 11,12,13... but still insufficient for sorting tasks.
therefore with right limit the string to the number of values with RIGHT(x,y)
example
=TEXTJOIN("",1,MID(RIGHT(B5,10),{10,9,8,7,6,5,4,3,2,1},1))

in German the syntax is quite different...
=TEXTVERKETTEN("";1;TEIL(RECHTS(A2;40);{40;39;38;37;36;35;34;33;32;31;30;29;28;27;26;25;24;23;22;21;20;19;18;17;16;15;14;13;12;11;10;9;8;7;6;5;4;3;2;1};1))

best regards Andreas
This comment was minimized by the moderator on the site
kok gak bisa yess..?
This comment was minimized by the moderator on the site
=TEXTJOIN("",1,MID(B5,{10,9,8,7,6,5,4,3,2,1},1)) worked for me to reverse characters in string. Thank you very much
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations