Excel does not have a built-in worksheet function named REVERSE. With the text in A2, enter =IF(A2="","",TEXTJOIN("",TRUE,MID(A2,SEQUENCE(LEN(A2),1,LEN(A2),-1),1))) in B2 to reverse its characters; for example, Excel 365 becomes 563 lecxE.
What reversing a string means
A string is a sequence of text characters. Reversing a string means putting those characters in the opposite order: the first becomes last, the second becomes second-to-last, and so on. The formula above reverses every character it processes, including spaces, punctuation, and digits. It does not change the capitalization of any character.
It is useful to distinguish reversing characters from reversing words. Reversing the text north east character by character produces tsae htron. Reversing the order of its words would instead produce east north, leaving each word intact. Those are different transformations, and Excel does not have a built-in worksheet function for either one called REVERSE.
Reversing a list is different again. If a column contains several names, reversing the string in each cell changes the letters inside each name. Reordering the rows changes which name appears first and last but leaves each name unchanged. Be clear about the intended result before choosing a formula or a data-cleaning method.
How the Excel formula works
The formula combines four worksheet functions. LEN counts the characters in the source cell. SEQUENCE generates a descending set of character positions, starting at the text’s length and stepping down by one. MID extracts one character at each position, and TEXTJOIN combines the extracted characters with an empty delimiter, so nothing is inserted between them.
The outer IF handles a blank source cell. Without that check, creating a sequence for a zero-length string can produce an error. The formula returns a blank result when A2 is blank; otherwise, it assembles the characters in reverse order. The TRUE argument in TEXTJOIN tells Excel to ignore empty values in the array, although the extracted characters are normally single-character results.
For example, if A2 contains Excel 365, LEN returns 9. SEQUENCE produces the positions 9, 8, 7, down to 1. MID reads those positions in that order, and TEXTJOIN combines the results as 563 lecxE. The spaces and digits move along with the letters because they are part of the same string.
Enter and fill the formula
- Put the text you want to reverse in A2. Leave B2 available for the result.
- Select B2, type the formula shown in the opening paragraph, and press Enter. Excel displays the reversed text in B2.
- To process more rows, drag B2’s fill handle down, or copy B2 and paste it into the cells below. The relative reference changes from A2 to A3, A4, and so on.
- If the reversed result must become fixed text rather than a calculated result, copy the output cells and use Paste Special > Values. Keep the original column until you have checked the results.
The formula is non-destructive: it reads the source cell and displays a result elsewhere. That makes it a sensible option when you may need to revise the input or compare the original with the reversed version. If the source value changes, the formula result updates automatically.
Excel versions and platform support
This formula uses SEQUENCE, a dynamic-array function available in Microsoft 365 and Excel 2021 or later. TEXTJOIN is also required. If Excel reports that SEQUENCE is an unrecognized function, the installed version may not support it. Excel 2019 and earlier do not have SEQUENCE, so this exact formula is not suitable for those releases.
In Microsoft 365 for Windows, the formula works in a normal worksheet cell; no special array-entry shortcut is needed. The same formula approach works in current Microsoft 365 desktop Excel for Mac and Excel for the web. Function availability and behavior can depend on the version being used, so an older perpetual-license version may differ. Formula argument separators can also vary with regional settings; if Excel rejects commas, check the list separator configured for that installation.
For a workbook shared with people using older Excel, consider whether they need to calculate the result themselves. A formula that works on your computer may show as an unsupported-function error in their version. If compatibility matters, use an approach supported by the oldest version in the group, or deliver the completed results as values after checking them.
Common problems and edge cases
The result looks unchanged. A one-character string reverses to itself, as does a string made entirely of repeated identical characters. Check a longer example such as abc, which should return cba, and confirm that the formula refers to the intended source cell.
Spaces appear in unexpected places. The formula preserves spaces; it does not trim them. If the source contains a leading space, that space becomes trailing in the reversed result. If it contains several spaces between words, all of them are reversed too. Clean the source separately if that is not what you want.
Numbers are treated as displayed text or stored values. Excel formulas operate on the cell value, not necessarily the way a number looks after formatting. A number formatted with leading zeros may not retain those zeros as text when processed. If the exact characters matter, store the source as text—for example, enter an identifier as text rather than relying only on number formatting.
Some emoji or accented text can behave unexpectedly. A visible symbol is not always represented internally by a single character unit. Emoji can consist of multiple Unicode code points, and a letter with a combining accent can also be made of separate parts. Reversing those parts individually may produce a result that looks broken or differs from a reader’s idea of a character-wise reversal. Test representative examples when processing multilingual text or emoji.
The formula shows a name or calculation error. Check that the Excel version supports SEQUENCE and TEXTJOIN, that the source reference is correct, and that the formula’s parentheses and separators match your regional settings. Also check whether the source cell contains an error value: the formula cannot turn an underlying error into ordinary text automatically.
Alternatives for older versions and permanent changes
If your version lacks SEQUENCE, a small VBA macro can reverse selected cell values using VBA’s StrReverse function. This is useful for a one-time transformation, but it changes the selected cells rather than returning results in a separate column. The following macro skips cells containing formulas and error values; it converts other selected values to text before reversing them.
Sub ReverseSelectedCells()
Dim target As Range
Dim cell As Range
' Work only with the selected worksheet cells.
Set target = Selection
For Each cell In target.Cells
If Not cell.HasFormula Then
If Not IsError(cell.Value) Then
cell.Value = StrReverse(CStr(cell.Value))
End If
End If
Next cell
End Sub
Save a copy of the workbook before running a macro. Macro changes cannot be undone with Ctrl+Z, and this one replaces selected constants with reversed text. In desktop Excel for Windows or Mac, VBA macros can be used if macros are permitted by the workbook’s security settings. Excel for the web does not run VBA macros.
For a small number of cells, manual entry or a helper workflow may be simpler than enabling macros. For a large dataset, choose a repeatable approach and test it on a copy first. If you need to retain the original information, keep it in a separate column or worksheet rather than overwriting it.
Choosing the right kind of reverse
Use the worksheet formula when you want a visible, automatically updating result and have a compatible Excel version. Use VBA when you need to change many selected values in place and can work with macro-enabled files. If the real goal is to reverse word order, reorder rows, or normalize text, use a method built for that task instead of reversing every character.
Before applying any method to a full dataset, test a few representative entries: a blank cell, a value with spaces, punctuation, digits, and any special characters that matter. Compare the output with the intended result, then decide whether formulas should remain live or be converted to values. This quick check can catch issues that are not obvious from a simple alphabetic example.
Frequently Asked Questions
Does Excel have a REVERSE function?
No. Excel has no built-in worksheet function named REVERSE. In Microsoft 365 or Excel 2021 and later, a formula using MID, SEQUENCE, LEN, and TEXTJOIN can reverse text.
Can I reverse text without VBA?
Yes. The worksheet formula in this guide reverses characters without a macro. It leaves the source value untouched and displays the result in another cell.
Does the formula reverse words or characters?
It reverses characters, including spaces and punctuation. It does not keep each word intact while changing the order of the words.
Why does my formula return #NAME?
One possibility is that your Excel version does not recognize SEQUENCE or another function in the formula. Check the version and function availability, then use a compatible method if necessary.
Can I reverse text in Excel for Mac?
Yes, current Microsoft 365 desktop Excel for Mac supports the same worksheet formula. VBA is also available in desktop Excel for Mac, although macro security and interface details can differ.
Related
- JavaScript .split(): How It Works and When to Use It
- C++ String Erase: How std::string::erase Works
- How to Split an Object in Onshape: A Step-by-Step Guide
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- SQL Server String Functions and How to Use ThemSQL Server string functions let you measure, search, extract, combine, replace, and format text in a query. Common…
- Excel Built-In String Functions and How to Use ThemExcel has built-in string functions—usually called text functions—that let you extract, search, clean, change, combine, and split text…
- Excel VLOOKUP Examples With a Drop-Down ListTo make a drop-down selection drive a lookup in Excel for Microsoft 365 on Windows, create a list…
- How to Apply a Filter in Excel to Find Data FastTo apply a filter in Excel, click a cell in your data, then choose Data > Filter. Use…
- Excel Rank No Ties? Use RANK.EQ and COUNTIFYes, Excel’s RANK.EQ function assigns the same rank to tied values by default, so two identical scores both…
- Excel Table Filter Multiple Columns: How It WorksYes. In an Excel table, you can filter multiple columns at the same time by choosing a filter…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.