How to reverse text in a cell in Excel
Excel formula
=TEXTJOIN("",TRUE,MID(A2,SEQUENCE(LEN(A2),,LEN(A2),-1),1))In Excel 365, read the characters from last to first and join them: =TEXTJOIN("",TRUE,MID(A2,SEQUENCE(LEN(A2),,LEN(A2),-1),1)).
- Result on the example
- one result per row in
B2, filled down toB6 - Works in
- Excel 2021, 2024 and Microsoft 365
- Google Sheets
- Different formula, see below
See it work
The formula is already in B2, filled down to B6. Change any input and the result updates, or edit the formula to experiment.
How it works
SEQUENCE(LEN(A2),,LEN(A2),-1) counts down from the length to 1, for example 11, 10, … 1. MID takes one character at each of those positions, so the characters come out last to first, and TEXTJOIN glues them back into one piece of text.
=TEXTJOIN("",TRUE,MID(A2,SEQUENCE(LEN(A2),,LEN(A2),-1),1))Result"teehsdaerpS"
A2"Spreadsheet"The value in A2.
LEN(A2)11LEN: Number of characters.- text
A2"Spreadsheet"
- text
LEN(A2)11LEN: Number of characters.- text
A2"Spreadsheet"
- text
-1-1Makes the value negative.
SEQUENCE(LEN(A2),,LEN(A2),-1){11 rows × 1 col} 11, 10, 9, 8, …SEQUENCE: A grid of sequential numbers. Spills.- rows
LEN(A2)11 - columns
(omitted) - start
LEN(A2)11 - step
-1-1
- rows
MID(A2,SEQUENCE(LEN(A2),,LEN(A2),-1),1){11 rows × 1 col} "t", "e", "e", "h", …MID: Characters from the middle of text.- text
A2"Spreadsheet" - start_num
SEQUENCE(LEN(A2),,LEN(A2),-1){11 rows × 1 col} 11, 10, 9, 8, … - num_chars
1
- text
TEXTJOIN("",TRUE,MID(A2,SEQUENCE(LEN(A2),,LEN(A2),-1),1))"teehsdaerpS"TEXTJOIN: Joins text with a delimiter between items.- delimiter
"" - ignore_empty
TRUE - text1
MID(A2,SEQUENCE(LEN(A2),,LEN(A2),-1),1){11 rows × 1 col} "t", "e", "e", "h", …
- delimiter
In Google Sheets
Google Sheets needs a different formula: =JOIN("",ARRAYFORMULA(MID(A2,SEQUENCE(LEN(A2),1,LEN(A2),-1),1))). On the same data it gives the same result. Here it is running in Google Sheets mode.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =CONCAT(MID(A2,SEQUENCE(LEN(A2),,LEN(A2),-1),1)) | teehsdaerpS, level, desserts… | CONCAT joins the characters too; there is no separator to set. |
Common mistakes
- SEQUENCE needs Excel 365 or 2021. Older versions have no simple formula for this.
- An empty cell makes SEQUENCE(0) fail with #VALUE!. Wrap in
IF(A2="","",…).
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Reverse text in a cell
B2, reverse the order of the characters and fill down to B6.Questions
How do I check whether a word is a palindrome?
Compare it with its reverse: =A2=B2 (ignores case), or =EXACT(A2,B2).
How do I reverse the order of words instead?
Split into words and sort them backwards by position: =TEXTJOIN(" ",TRUE,SORTBY(TEXTSPLIT(A2,," "),SEQUENCE(ROWS(TEXTSPLIT(A2,," "))),-1)).
Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.