Features of !SEMTools
↑ Navigate Excel tasks and !SEMTools add-in features ↑

Reverse text in Excel: flip characters in a cell

, creator of !SEMToolsUpdated 9 min readTopics: Text and characters

The tool in this article is available in !SEMTools Lite and Pro.

Reverse text in Excel cells: flip characters or word order
Characters reversed in one column, word order in the other. Palindromes like «racecar» survive both.

Reversing “AB-120” gives “021-BA”. Reversing a product code this way can help you locate a delimiter counted from the right. For phrases, you may instead want to reverse word order and keep the letters readable.

If you need to swap words rather than letters, see how to change the word order in a cell.

Why reverse text in a cell

Reversing a string is not just a party trick. Flipped text comes in handy in real tasks:

  • Searching from the end of a string — SEARCH and FIND only look from left to right. Reverse the string, and the last occurrence becomes the first.
  • Checking palindromes — a word or phrase reads the same both ways if it matches its reversed copy: “level”, “Never odd or even”.
  • Mirrored codes and IDs — for example, to find item numbers that were typed backwards by mistake.
  • Puzzles and training tasks — simple ciphers, brain teasers, right-to-left text.

Reverse text with formulas in Excel 2013

For nonempty text in A2, use empty columns B:C. “Excel” has five characters, so fill B2:C6. Enter the formulas with Enter.

B2, fill down for the number of characters in A2:

=MID($A$2,LEN($A$2)-ROWS($B$2:B2)+1,1)

C2:

=B2

C3, fill down to the last character. The last C cell returns “lecxE”.

=C2&B3

Excel 2019: TEXTJOIN as an array formula

Excel 2019 has no SEQUENCE, so we calculate the reversed positions with ROW and INDIRECT and join the result with TEXTJOIN:

=TEXTJOIN("",TRUE,MID(A1,LEN(A1)-ROW(INDIRECT("1:"&LEN(A1)))+1,1))
The same in Excel 2019
B2=TEXTJOIN("",TRUE,MID(A2,LEN(A2)-ROW(INDIRECT("1:"&LEN(A2)))+1,1))
AB
1TextReversed
2ExcellecxE=TEXTJOIN("",TRUE,MID(A2,LEN(A2)-ROW(INDIRECT("1:"&LEN(A2)))+1,1))
31234554321=TEXTJOIN("",TRUE,MID(A3,LEN(A3)-ROW(INDIRECT("1:"&LEN(A3)))+1,1))
4levellevel=TEXTJOIN("",TRUE,MID(A4,LEN(A4)-ROW(INDIRECT("1:"&LEN(A4)))+1,1))
5buy iphone caseesac enohpi yub=TEXTJOIN("",TRUE,MID(A5,LEN(A5)-ROW(INDIRECT("1:"&LEN(A5)))+1,1))

ROW(INDIRECT("1:"&LEN(A2))) gives 1…N; LEN − ROW + 1 turns it into N…1. Enter with Ctrl+Shift+Enter in Excel 2019.

Important: in Excel 2019 this is an array formula, so enter it with Ctrl+Shift+Enter. With a plain Enter, the result will be wrong.

Excel 2021–2024: the same result with one formula. Empty A2 returns an empty string:

=IF(A2="","",TEXTJOIN("",TRUE,MID(A2,SEQUENCE(LEN(A2),,LEN(A2),-1),1)))

Reverse text with a formula in Excel 365

In Excel 365 and Excel 2021, you can reverse text with one formula. It uses MID, LEN, SEQUENCE and CONCAT:

=CONCAT(MID(A1,SEQUENCE(LEN(A1),,LEN(A1),-1),1))
Reverse text (Excel 365)
B2=CONCAT(MID(A2,SEQUENCE(LEN(A2),,LEN(A2),-1),1))
AB
1TextReversed
2ExcellecxE=CONCAT(MID(A2,SEQUENCE(LEN(A2),,LEN(A2),-1),1))
31234554321=CONCAT(MID(A3,SEQUENCE(LEN(A3),,LEN(A3),-1),1))
4levellevel=CONCAT(MID(A4,SEQUENCE(LEN(A4),,LEN(A4),-1),1))
5buy iphone caseesac enohpi yub=CONCAT(MID(A5,SEQUENCE(LEN(A5),,LEN(A5),-1),1))

SEQUENCE lists the positions from the last to the first, MID takes one character at each, and CONCAT joins them. “level” reads the same both ways.

This formula takes the text in A1 and joins its characters in reverse order, from the last one to the first.

How the formula works

  • LEN(A1) returns the text length, for example 5 for “Excel”;
  • SEQUENCE(5,,5,-1) builds the positions in reverse order: {5;4;3;2;1};
  • MID(A1,{5;4;3;2;1},1) takes one character from each position and returns the array {"l";"e";"c";"x";"E"};
  • CONCAT joins the array into one string: “lecxE”.

Palindromes and the last space in Excel 2013

If column C already holds the running reversed result from the Excel 2013 example, its final row number is LEN(A2)+1. Reuse that cell for the palindrome check instead of repeating the reversal formula. The comparison below ignores ordinary spaces and case, but not punctuation.

Palindrome check, Enter:

=LOWER(SUBSTITUTE(A2," ",""))=LOWER(SUBSTITUTE(INDEX(C:C,LEN(A2)+1)," ",""))

To find the position of the last space, reversal is not needed at all. Enter with Enter; no spaces returns #N/A:

=LOOKUP(2,1/(MID(A2,ROW(INDIRECT("1:"&MAX(1,LEN(A2)))),1)=" "),ROW(INDIRECT("1:"&MAX(1,LEN(A2)))))

Reversed text in practice: palindromes and searching from the end

Here is what reversing looks like on real examples:

Original textReversedPalindrome?
ExcellecxEFALSE
levellevelTRUE
Never odd or evenneve ro ddo reveNTRUE
1234554321FALSE
49151944915194TRUE

Check whether a phrase is a palindrome

For “Never odd or even” to count as a palindrome, remove the spaces and convert the text to lowercase before comparing. With LET in Excel 365, the formula stays compact:

=LET(t,LOWER(SUBSTITUTE(A1," ","")),t=CONCAT(MID(t,SEQUENCE(LEN(t),,LEN(t),-1),1)))
Palindrome check
B2=LET(t,LOWER(SUBSTITUTE(A2," ","")),t=CONCAT(MID(t,SEQUENCE(LEN(t),,LEN(t),-1),1)))
AB
1PhrasePalindrome?
2Never odd or evenTRUE=LET(t,LOWER(SUBSTITUTE(A2," ","")),t=CONCAT(MID(t,SEQUENCE(LEN(t),,LEN(t),-1),1)))
3levelTRUE=LET(t,LOWER(SUBSTITUTE(A3," ","")),t=CONCAT(MID(t,SEQUENCE(LEN(t),,LEN(t),-1),1)))
4ExcelFALSE=LET(t,LOWER(SUBSTITUTE(A4," ","")),t=CONCAT(MID(t,SEQUENCE(LEN(t),,LEN(t),-1),1)))
5Was it a car or a cat I sawTRUE=LET(t,LOWER(SUBSTITUTE(A5," ","")),t=CONCAT(MID(t,SEQUENCE(LEN(t),,LEN(t),-1),1)))

Spaces are removed and the case is lowered before the comparison, so whole phrases count. Punctuation would break the check — remove it with REGEXREPLACE(A2,"[^A-Za-z0-9]","") first.

The formula cleans the text, reverses it and compares it with the original: TRUE means a palindrome, FALSE means it’s not. If the phrase contains commas or other punctuation, remove them too, or the formula will return FALSE.

Find the position of the last space by reversing

A classic trick: reverse the string, find the space with a regular SEARCH and convert the position back:

=LEN(A1)-SEARCH(" ",CONCAT(MID(A1,SEQUENCE(LEN(A1),,LEN(A1),-1),1)))+1
Position of the last space
B2=LEN(A2)-SEARCH(" ",CONCAT(MID(A2,SEQUENCE(LEN(A2),,LEN(A2),-1),1)))+1
AB
1TextLast space at
2ab cd efgh6=LEN(A2)-SEARCH(" ",CONCAT(MID(A2,SEQUENCE(LEN(A2),,LEN(A2),-1),1)))+1
3New York City9=LEN(A3)-SEARCH(" ",CONCAT(MID(A3,SEQUENCE(LEN(A3),,LEN(A3),-1),1)))+1
4one#VALUE!=LEN(A4)-SEARCH(" ",CONCAT(MID(A4,SEQUENCE(LEN(A4),,LEN(A4),-1),1)))+1

In the reversed text, the last space becomes the first, SEARCH finds it, and LEN − position + 1 converts it back. No space → #VALUE!.

For “ab cd efgh” the formula returns 6, the position of the last space. Other ways to solve this, including ones without reversing, are covered in the article on searching from the end of a string in Excel.

Reverse text in Excel 2010–2016 with a VBA function

In Excel 2013, the helper cells above rebuild the result one character at a time. If you use this often, VBA’s StrReverse gives you a shorter worksheet call.

  1. Press Alt+F11 to open the VBA editor.
  2. Choose Insert → Module.
  3. Paste the code below and close the editor.
Function REVERSETEXT(s As String) As String
    REVERSETEXT = StrReverse(s)
End Function

Now this formula works on the sheet:

=REVERSETEXT(A1)
The VBA function REVERSETEXT
B2=REVERSETEXT(A2)
AB
1TextReversed
2ExcellecxE=REVERSETEXT(A2)
31234554321=REVERSETEXT(A3)
4levellevel=REVERSETEXT(A4)
5buy iphone caseesac enohpi yub=REVERSETEXT(A5)

StrReverse does the same as the formulas and works in any Excel version, but the workbook must be saved as .xlsm.

To be fair, the function works only in this workbook, and you’ll have to save it as .xlsm. To use it in every file, put the code in your Personal Macro Workbook, but then you need to call it with the workbook name:

=PERSONAL.XLSB!REVERSETEXT(A1)

Reverse text in cells in place with !SEMTools

For a one-time edit, select a copy of the column containing the strings.

Choose CHANGE → Cells → Flip → Characters. Each selected cell now contains its reversed text.

By the way, the same menu also flips the order of words, if you want “buy iphone case” to become “case iphone buy” rather than “esac enohpi yub”.

Why text doesn’t reverse correctly: common mistakes

  • The number turned into text. Reversing formulas always return text: “54321” looks like a number but isn’t summed. Put two minus signs before the formula (a double negation, see the example below) to get a number. Note that leading zeros disappear: reversing “1200” gives “0021”, and as a number it’s 21.
  • Dates and formatted numbers reverse “strangely”. Excel stores a date as a number, so the formula reverses 10/18/2026 as “31364”, the serial number of the day read backwards. To reverse what you see in the cell, first convert the value to text with TEXT.
  • Emoji and rare characters break. Excel functions work with UTF-16 characters, and an emoji is two characters for them. When reversed, the halves swap places, and you get squares instead of the emoji.
  • The formula shows #NAME?. Your Excel version doesn’t have SEQUENCE or CONCAT. Use the Excel 2019 version or the VBA function.

This is how to reverse a number and keep it a number:

=--CONCAT(MID(A1,SEQUENCE(LEN(A1),,LEN(A1),-1),1))
Reverse a number and keep it a number
C2=--CONCAT(MID(A2,SEQUENCE(LEN(A2),,LEN(A2),-1),1))
ABC
1NumberReversed (text)Reversed (number)
21234554321=CONCAT(MID(A2,SEQUENCE(LEN(A2),,LEN(A2),-1),1))54321=--CONCAT(MID(A2,SEQUENCE(LEN(A2),,LEN(A2),-1),1))
312000021=CONCAT(MID(A3,SEQUENCE(LEN(A3),,LEN(A3),-1),1))21=--CONCAT(MID(A3,SEQUENCE(LEN(A3),,LEN(A3),-1),1))
4907709=CONCAT(MID(A4,SEQUENCE(LEN(A4),,LEN(A4),-1),1))709=--CONCAT(MID(A4,SEQUENCE(LEN(A4),,LEN(A4),-1),1))

The formula returns text (left-aligned); the double minus makes it a number. Leading zeros disappear: 1200 → “0021” as text, 21 as a number.

Reverse text in cells right in place, with no formulas, macros or helper columns. Select the column, click the button, done. !SEMTools solves this and hundreds of other tasks in a couple of clicks!

Summary: which way to reverse text

I hope you found what you were looking for on this page and were able to reverse the characters in your cells. In Excel 365, a SEQUENCE formula is enough for a one-off task. In Excel 2019, TEXTJOIN as an array formula does the job, and in older versions, a VBA function. For regular work with large data sets, the !SEMTools tool is the easiest option: it changes the text right in the source cells, with no formulas to clean up afterwards.

You may also be interested in related operations: add text to multiple cells at once, or see all tools for changing cells in the add-in.

Leave a Reply

Your email address will not be published. Required fields are marked *

*