🌐
Microsoft Support
support.microsoft.com › en-us › office › trim-function-410388fa-c5df-49c6-b16c-9e5630b479f9
TRIM function | Microsoft Support
Example 3: =TRIM(CLEAN(B5)) combines TRIM and CLEAN functions to remove spaces and clean string. Example 4: ​​​​​​​Copy the example data in the following table and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter.
🌐
W3Schools
w3schools.com › excel › excel_trim.php
Excel TRIM Function
Use Trim to tidy up irregular spaces in the dataset within the range A2:C21. Note: To define the range, separate the range values with a colon symbol : ... Copy the values in the example above and try it on your own!
Discussions

Trim Function
Is there a way to use TRIM/LEFT/RIGHT/LEN with an Excel textstring to remove the Nth character after the Nth occurrence of a numeric value? As an example, I would like to have a function that would trim strings 9U100 and GF3C06 after the 1st occurrence of a numeric value at the 3rd character ... More on techcommunity.microsoft.com
🌐 techcommunity.microsoft.com
3
0
July 14, 2023
Is there a way to remove the last two characters from a field?
u/jennrh - Your post was submitted successfully. Once your problem is solved, reply to the answer(s) saying Solution Verified to close the thread. Follow the submission rules -- particularly 1 and 2. To fix the body, click edit. To fix your title, delete and re-post. Include your Excel version and all other relevant information Failing to follow these steps may result in your post being removed without warning. I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns. More on reddit.com
🌐 r/excel
23
18
February 15, 2024
Assistance with trim function please

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

FIND Finds one text value within another (case-sensitive) LEN Returns the number of characters in a text string RIGHT Returns the rightmost characters from a text value SEARCH Finds one text value within another (not case-sensitive) SUBSTITUTE Substitutes new text for old text in a text string TEXTAFTER Office 365+: Returns a string of text that occurs after a substring in a string. It is the opposite of the TEXTBEFORE function. TEXTBEFORE Office 365+: Returns a string of text that occurs before a given substring in that string. It is the opposite of the TEXTAFTER function.

Beep-boop, I am a helper bot. Please do not verify me as a solution.
6 acronyms in this thread; the most compressed thread commented on today has 17 acronyms.
[Thread #16702 for this sub, first seen 20th Jul 2022, 18:30] [FAQ] [Full list] ^[Contact] [Source code]

More on reddit.com
🌐 r/excel
9
1
July 20, 2022
TRIM Function and converting to numbers to SUM values
Trim produces text. Need to wrap it in VALUE() to make it a number again. More on reddit.com
🌐 r/excel
12
1
June 23, 2022
🌐
DataCamp
datacamp.com › tutorial › trim-function-in-excel
Use the TRIM() Function in Excel: Fix Any Spacing Issue | DataCamp
February 19, 2025 - You now know the TRIM() function removes extra spaces in Excel and prevents calculation issues. So, no matter what you’re doing, whether you are importing data or removing hidden or special characters, you don’t have to fix issues one by one.
🌐
Corporate Finance Institute
corporatefinanceinstitute.com › home › resources › trim function
TRIM Function - Formula, Examples, How to Use TRIM in Excel
May 11, 2026 - The TRIM function in Excel removes extra spaces from text, leaving only single spaces between words. It cleans up data by eliminating leading, trailing, and intervening spaces, useful for data imported from other sources.
🌐
ExcelDemy
exceldemy.com › home › excel functions › how to trim right characters and spaces in excel (5 ways)
How to Trim Right Characters and Spaces in Excel (5 Ways) - ExcelDemy
June 17, 2024 - The code will create a custom function named TRIMLASTX which will trim a defined number of characters from the right side of the selected cell. Close the VBA window and type the following formula in cell D5. ... C5 is the selected cell and 6 indicates the number of characters that will be removed. Press ENTER. ... << Go Back to Excel TRIM Function | Excel Functions | Learn Excel Get FREE Advanced Excel Exercises with Solutions!
🌐
GoSkills
goskills.com › excel › resources › trim-function-excel
How to Use the TRIM Function in Excel | GoSkills
It could be reasoned that we need to trim the text string before extracting the last seven characters, so we will embed the TRIM function within the RIGHT function so that Excel processes that result first.
🌐
Wall Street Mojo
wallstreetmojo.com › home › all blogs › excel resources › trim in excel
TRIM in Excel - How To Use? Formula, Errors, Examples, Template
December 20, 2024 - The TRIM in Excel removes extra spaces from the text, leaving no extra space between words and at the beginning and end of the string. It can only remove the ASCII space character (32) from text/string.
🌐
The Bricks
thebricks.com › home › resources › how to use the trim function in excel: a step-by-step guide
How to Use the TRIM Function in Excel: A Step-by-Step Guide
April 22, 2025 - Your formula will now look like this: =TRIM(A1 · Type the closing parenthesis ) to complete the formula and press the Enter key. Cell B1 will instantly display the cleaned version: "Peter Jones". ... You don't need to retype the formula for every row. Click on cell B1, then look for the small green square at the bottom-right corner of the cell's border. This is the "Fill Handle." Double-click the Fill Handle, and Excel will automatically copy the formula down for all of your data in column A.
Find elsewhere
🌐
Exceljet
exceljet.net › home › functions › trim function
Excel TRIM function | Exceljet
December 3, 2022 - The Excel TRIM function strips extra spaces from text, leaving only a single space between words and no space characters at the start or end of the text. ... Text with extra spaces removed. ... The TRIM function strips extra spaces from text, leaving only a single space between words, and removing any leading or trailing space...
🌐
Trump Excel
trumpexcel.com › home › excel functions › right function in excel (6 examples)
RIGHT Function in Excel (6 Examples)
2 weeks ago - The RIGHT function is a simple way to pull characters off the end of a text string, and it gets a lot more useful the moment you pair it with LEN, FIND, VALUE, and TRIM.
🌐
Microsoft Learn
learn.microsoft.com › en-us › office › vba › language › reference › user-interface-help › ltrim-rtrim-and-trim-functions
LTrim, RTrim, and Trim functions (Visual Basic for Applications) | Microsoft Learn
September 13, 2021 - It uses the Trim function to strip both types of spaces. Dim MyString, TrimString MyString = " <-Trim-> " ' Initialize string. TrimString = LTrim(MyString) ' TrimString = "<-Trim-> ". TrimString = RTrim(MyString) ' TrimString = " <-Trim->". TrimString = LTrim(RTrim(MyString)) ' TrimString = "<-Trim->".
🌐
MakeUseOf
makeuseof.com › home › productivity › how to use the trim function in excel
How to Use the TRIM Function in Excel
July 24, 2021 - The TRIM function removes extra spaces from your cells, leaving only a single space between the words and none before and after it. A neat string could be just what you need as input for other sophisticated formulas.
🌐
TechOnTheNet
techonthenet.com › excel › formulas › rtrim.php
MS Excel: How to use the RTRIM Function (VBA)
The Microsoft Excel RTRIM function removes trailing spaces from a string. The RTRIM function is a built-in function in Excel that is categorized as a String/Text Function. It can be used as a VBA function (VBA) in Excel.
🌐
Ablebits
ablebits.com › ablebits blog › excel › excel formulas › excel right function with formula examples
Excel RIGHT function with formula examples
March 20, 2023 - The tutorial shows how to use the RIGHT function in Excel. Formula examples to get a substring after a certain character or after the last occurrence of the delimiter, to remove the first few characters in a string, and more.
🌐
GoSkills
goskills.com › resources › excel-right-function
How to Use the Excel RIGHT Function | GoSkills
September 27, 2021 - We can fix this by combining RIGHT with the TRIM function. TRIM is designed to remove all spaces from a text string except for one space between words. ... Quick note on combining functions: If you’re just learning how to nest (combine) functions, ...
🌐
Ablebits
ablebits.com › ablebits blog › excel › excel formulas › excel: remove first or last characters (from left or right)
How to remove first (left) or last (right) characters in Excel
March 13, 2023 - To extract the text after the last '-' delimiter, use these instructions: Get last word from string. Based on your information, the formula might look something like this: =TRIM(RIGHT(SUBSTITUTE(A1, "-", REPT(" ", LEN(A1))), LEN(A1)))
🌐
Microsoft Support
support.microsoft.com › en-us › excel › functions › right-function
RIGHT function | Microsoft Support
RIGHT returns the last character or characters in a text string, based on the number of characters you specify. RIGHTB returns the last character or characters in a text string, based on the number of bytes you specify.
🌐
Exceljet
exceljet.net › home › formulas › remove characters from right
Remove characters from right - Excel formula | Exceljet
May 16, 2025 - As the formula is copied down, it uses the LEFT function to remove the last character in each text string. The values in column D show the result. This formula will work in all versions of Excel.
🌐
Macabacus
macabacus.com › home › how to trim cells in excel
How to Trim Cells in Excel (Downloadable Template)
November 18, 2025 - In this post, we’ll explore the ... data-cleaning process. ... Excel’s TRIM function aims to throw out extra spaces in your text, leaving just one space between words....