Spreadsheet Practice

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 to B6
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"

  1. A2"Spreadsheet"

    The value in A2.

  2. LEN(A2)11

    LEN: Number of characters.

    • textA2"Spreadsheet"
  3. LEN(A2)11

    LEN: Number of characters.

    • textA2"Spreadsheet"
  4. -1-1

    Makes the value negative.

  5. SEQUENCE(LEN(A2),,LEN(A2),-1){11 rows × 1 col} 11, 10, 9, 8, …

    SEQUENCE: A grid of sequential numbers. Spills.

    • rowsLEN(A2)11
    • columns(omitted)
    • startLEN(A2)11
    • step-1-1
  6. MID(A2,SEQUENCE(LEN(A2),,LEN(A2),-1),1){11 rows × 1 col} "t", "e", "e", "h", …

    MID: Characters from the middle of text.

    • textA2"Spreadsheet"
    • start_numSEQUENCE(LEN(A2),,LEN(A2),-1){11 rows × 1 col} 11, 10, 9, 8, …
    • num_chars1
  7. TEXTJOIN("",TRUE,MID(A2,SEQUENCE(LEN(A2),,LEN(A2),-1),1))"teehsdaerpS"

    TEXTJOIN: Joins text with a delimiter between items.

    • delimiter""
    • ignore_emptyTRUE
    • text1MID(A2,SEQUENCE(LEN(A2),,LEN(A2),-1),1){11 rows × 1 col} "t", "e", "e", "h", …

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.

FormulaResultWhen 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

In 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.