TOP
Remove spaces at the beginning and end of the text
Text > Remove leading and trailing spaces
Sometimes your data contains leading or trailing spaces. Someone may have accidentally added extra spaces, or imported text data from external sources may contain extra spaces.
Leading and/or trailing spaces can cause unexpected results when sorting, filtering, or using formulas.
This utility removes all leading and trailing spaces from the values in the selected cells.
For example, if you have a cell with a value " LibreOffice " , then this utility changes the value to "LibreOffice" without leading or trailing spaces.
Screenshot
Launch this tool
Click YLC Utilities > Text > Remove leading and trailing spaces :
Do you recognize any of these situations?
- I need to remove the leading space from several cells, 800 or more. The leading space is before the text, which is often multi-word, so I can't just find and replace the spaces.
- How can I remove spaces only to the left and right of a text string and keep the spaces inside the text string? The LO function Calc =TRIM() reduces whitespace within text to single spaces.
- I have some cells that contain imported text with lots of leading spaces. I'm trying to get rid of them using the =TRIM() function on those cells, but it doesn't work.
- My workbook contains data imported from another program, and unfortunately many of these cells have padded spaces.
I need to remove them, but the 4000+ cells individually will take hours.
- I'm having trouble sorting the data because of spaces at the beginning. Manually removing these gaps takes hours. Is there some magic trick to this?
- Your =VLOOKUP() formulas cannot find matching values because of unwanted spaces.
- They sent you a mailing list, but it looks bad with all the extra spaces.
- Cells that appear to be empty are not because they contain a space.
- LO Calc does not recognize some cells as empty. This often happens with imported data.
- Duplicate values are not removed due to spaces at the beginning and/or end of some values.
Just select the cells and then use this tool:
YLC Utilities » Text » Remove leading and trailing spaces
How much time will it save?
Using this tool, you are guaranteed to save time and effort. However, the actual time savings depends on how often you use LibreOffice Calc, the amount of data you work with, and how often you use the tool.
Download
If you don't already have YLC Utilities, you can download the free version "YouLibreCalc.oxt" or the full-featured version "YLC_Utilities.oxt" .
Additional keywords for this tool:
extra spaces, remove extra spaces, unnecessary spaces, spaces, clear empty cells, fix empty cells that LO Calc does not recognize as empty, fix empty cells, spaces, remove unnecessary spaces from a cell