Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Excel Formula to Reverse a String: Step-by-Step

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Excel has no built-in REVERSE function, but you can reverse a string with ordinary worksheet formulas. The shortest reliable approach uses a helper column of sequence numbers plus a MID formula that pulls characters from the end of the text and rebuilds them in reverse order. If you have Microsoft 365, REDUCE, LAMBDA, SEQUENCE and CONCAT give you a single-cell formula instead. This guide covers both methods, plus the older array formula for Excel 2019 and earlier.

What You'll Need

  • A version of Excel that supports the functions you plan to use. REDUCE, LAMBDA, SEQUENCE, CONCAT and LET need a current Microsoft 365 subscription build; TEXTJOIN and the ROW-based array approach work in Excel 2019, 2021 and 365.
  • Your source text in a single cell with no line breaks inserted by Alt+Enter, since those characters count as characters too.
  • A free column next to your data if you use the helper-column method, so the sequence numbers have somewhere to live.
  • Nothing else. No add-in, no macro and no Power Query step is required.

Step-by-Step

Method 1: Helper Column and MID (works in every version)

  1. Put your text in cell A2. For example,Hello. Keep it in one cell; this method reverses the contents of a single cell at a time.
  2. In B2, enter=LEN(A2). This returns the number of characters in A2, which is 5 forHello. LEN counts spaces and punctuation, soHi there returns 8.
  3. In C2, enter=ROW(A1). This gives 1. Drag the fill handle down until the numbers run from 1 to the length of your longest string. If your longest text is 40 characters, fill down to row 41 so you have 40 numbers. This is your sequence column.
  4. In the cell beside the first number, enter=MID($A$2,$B$2-C2+1,1). The formula subtracts the sequence number from the total length and adds 1, so the first pick is the last character, the second pick is the second-to-last, and so on. The final1 tells MID to take exactly one character.
  5. Copy that formula down the full length of the sequence column. You now have each character of the original text stacked vertically in reverse order, with spaces appearing as blank-looking cells.
  6. Join the characters back into one string. In Excel 2019, 2021 and 365, use=TEXTJOIN("",TRUE,D2:D41) where D is the MID column. The empty first argument means no separator, and TRUE ignores empty cells so blank characters do not create gaps.
  7. Wrap it into one formula if you prefer. Instead of listing the range, enter=TEXTJOIN("",TRUE,MID(A2,LEN(A2)-ROW(INDIRECT("1:"&LEN(A2)))+1,1)) and confirm it as an array formula. In Excel 2019 and earlier press Ctrl+Shift+Enter so the formula is wrapped in braces; in dynamic-array versions just press Enter. This reverses the string in a single cell without helper columns.

Method 2: REDUCE and LAMBDA (Microsoft 365 only)

  1. Place the source text in A2.
  2. In B2, enter=REDUCE("",SEQUENCE(LEN(A2)),LAMBDA(acc,i,MID(A2,LEN(A2)-i+1,1)&acc)). Reading inside out: SEQUENCE builds 1 through the text length, LAMBDA takes each number, grabs the matching character from the end, and prepends it to the running result inacc. REDUCE feeds every number through and returns one finished string.
  3. Press Enter. Cell B2 now holds the reversed text. Copy down to reverse an entire column.
  4. To make it easier to audit, add LET around it:=LET(t,A2,n,LEN(t),REDUCE("",SEQUENCE(n),LAMBDA(acc,i,MID(t,n-i+1,1)&acc))). The source text and its length are named once, so you only change A2.

Common Mistakes

  • Forgetting to anchor the row and length references. When you copy the helper-column formula down,A2 andB2 shift unless you write$A$2 and$B$2, and the reversed characters come from the wrong rows.
  • Filling the sequence too short. If the sequence stops before the text length, the first characters of the original are simply missing from the result. Always size the sequence to the longest string in the column.
  • Using an empty separator in TEXTJOIN by mistake. Writing a space inside the quotes inserts a space between every character. Use"" with nothing between the quotes.
  • Expecting the result to stay a value. Both methods return formulas. If you need plain text, copy the result and use Paste Special > Values.
  • Trying to reverse a range instead of a cell. These formulas reverse one cell's contents. To handle a column of text, copy the formula down and reverse each cell separately.
  • Using an old version of Excel with new functions. REDUCE and LAMBDA produce #NAME? errors in Excel 2019 and earlier because those functions do not exist there.

Tips

  • Test on a short word first, such ascat, so you can see immediately whether the logic is picking characters from the right end.
  • Remember that capitals, digits, spaces and punctuation all count as single characters, soAb 1 reverses to1 bA exactly as written.
  • If your text may contain trailing spaces, wrap the source in TRIM before reversing. Otherwise the reversed result starts with those invisible spaces and looks wrong when compared to another cell.
  • Name the source cell (Formulas > Define Name) and refer to the name in the formula, which makes copying across sheets much safer than fixed cell references.
  • To reverse a number, convert it to text first with TEXT or by appending&"", because numeric cells lose leading zeros and are not treated as strings.
  • Keep a copy of the original column. Reversing is easy to get subtly wrong, and comparing the original and reversed text side by side is the fastest way to spot a dropped character.

Troubleshooting

  • #NAME? error: the function is not available in your Excel version, or the name is misspelled. Check which functions your build supports before switching methods.
  • #VALUE! error: usually a stray character inside the formula, an unclosed parenthesis, or an array-confirmation problem in Excel 2019 and earlier. Rebuild the formula one parenthesis level at a time.
  • Result is one character short: the sequence column stops before the text length. Extend the sequence and re-copy the MID formula into the new rows.
  • Result contains spaces you did not type: TEXTJOIN is using a separator you did not want, or the source has trailing spaces. Fix the first argument or apply TRIM to the source.
  • Result changes when you sort or insert rows: relative references are moving. Lock the source cell with dollar signs and, for the ROW+INDIRECT array formula, confirm it still refers to the intended cell.
  • Formula works on one row but not others: the length reference is pointing at the wrong cell. Each row's formula should read that row's own length.

Frequently Asked Questions

Is there a built-in REVERSE function in Excel?

No. Excel has no REVERSE function in any version. The standard workarounds are the MID plus TEXTJOIN array formula and the REDUCE/LAMBDA approach in Microsoft 365.

Can I reverse text in Google Sheets the same way?

Google Sheets also lacks a REVERSE function, but the TEXTJOIN, MID, SEQUENCE and LAMBDA combination works there as well, and Google Sheets treats array formulas natively, so you do not need Ctrl+Shift+Enter.

Can I reverse text without helper columns?

Yes, using the array formula with ROW and INDIRECT, or the REDUCE/LAMBDA version. Both return the reversed string in a single cell with nothing in adjacent columns.

Why does my reversed text drop the first letter?

The sequence almost always stops one or more steps short of the full length, so the formula never reaches the original first character. Extend the sequence or confirm LEN is measuring the correct cell.

Does reversing text affect formatting or numbers?

The formula returns text, so all formatting is lost and any number becomes a text string. Leading zeros survive because they are now characters, not numeric values. Paste Special > Values if you need a static result.