[Solved] Remove space at beginning/end of cell

Discuss the spreadsheet application
Locked
THEBookMan
Posts: 122
Joined: Wed Sep 30, 2015 10:03 pm
Location: Houston, TX area

[Solved] Remove space at beginning/end of cell

Post by THEBookMan »

FIND & REPLACE
I want to find the space at the end of a cell and replace with "".
I want to find the space at the beginning of a cell and replace with "".

Have trioed several things like ;
^"", ^[], etc, but to no avail.

Any ideas ?

Thnak you,
⌡im [the BookMan]
Last edited by MrProgrammer on Mon Mar 24, 2025 3:17 pm, edited 1 time in total.
Reason: Tagged ✓ [Solved]
Open Office 4.1.3 Win 10
User avatar
RoryOF
Moderator
Posts: 35210
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Find space at beginning/end of cell

Post by RoryOF »

Beginning of cell, Find ^<space> where <space> is a press of spacebar. Replace "" Drop More options and check Regular expressions

End of cell, Find <space>$, Replace "", set More Options as above.
Apache OpenOffice 4.1.16 on Xubuntu 24.04.4 LTS
User avatar
karolus
Volunteer
Posts: 1243
Joined: Sat Jul 02, 2011 9:47 am

Re: Find space at beginning/end of cell

Post by karolus »

Hallo
Search for:

Code: Select all

^\s+|\s+$
replace with semantically nothing ( ! no input in replace-field !)

[x] regular Expression

replace all
Libreoffice 25.2… on Debian 13 (trixie) (on RaspberryPI5)
Libreoffice 25.8… flatpak on Debian 13 (trixie) (on RaspberryPI5)
Locked