Hi everyone and good wishes for all. I have a question about calc functions. I've got a cell with the entire name of a person: Ex.: "Gabrielle Antoine Dugos Fermin".
And I need to count the number of times that the blankspace " " appears within the character string, say, 4 times. If I have a cell "John Camille Smith" I'd like to see a number 2, of 2 times.
What function is useful for this?
Thank you very much.
[Solved] Find and count a character in a cell
- normansimonr
- Posts: 117
- Joined: Wed Feb 16, 2011 8:22 pm
- Location: Colombia
[Solved] Find and count a character in a cell
Last edited by normansimonr on Thu Jul 14, 2011 7:33 pm, edited 1 time in total.
OpenOffice 3.1 on Ubuntu-Linux 9.04
Re: Find and count a character in a cell
Hi
Karolus
Code: Select all
=LEN(A1)-LEN(SUBSTITUTE(A1;" ";""))
Libreoffice 7.4 on Debian 12 (Bookworm) (on RaspberryPI4)
Libreoffice 24.8… flatpak on Debian 12 (Bookworm) (on RaspberryPI4)
- normansimonr
- Posts: 117
- Joined: Wed Feb 16, 2011 8:22 pm
- Location: Colombia
Re: Find and count a character in a cell
Great!... it works. Could you help me explaining this a l'e more?
Thanks.
Thanks.
OpenOffice 3.1 on Ubuntu-Linux 9.04
Re: Find and count a character in a cell
The SUBSTITUTE function is dealt with at
http://wiki.services.openoffice.org/wik ... E_function
and at
http://www.openofficetips.com/2005/11/1 ... ubstitute/
http://wiki.services.openoffice.org/wik ... E_function
and at
http://www.openofficetips.com/2005/11/1 ... ubstitute/
Apache OpenOffice 4.1.15 on Xubuntu 22.04.5 LTS
- normansimonr
- Posts: 117
- Joined: Wed Feb 16, 2011 8:22 pm
- Location: Colombia
-
- Posts: 1
- Joined: Fri Sep 30, 2011 4:10 pm
Re: Find and count a character in a cell
Thanks Karolus, it works slick. You saved the day.karolus wrote:HiKarolusCode: Select all
=LEN(A1)-LEN(SUBSTITUTE(A1;" ";""))
David Lee
David Lee
OpenOffice 3.3.0 on Windows XP
OpenOffice 3.3.0 on Windows XP
Re: [Solved] Find and count a character in a cell

- Harry: 1 person
Debra + Pam: 2 people
Joe + Jo + Ĝo: 3 people
/ˈθnɪdu/
OpenOffice 4.0.1 on Mac OS X 10.7.5
ᏌᏊ ᎦᏬᏂᏍᏗ ᎥᏝ ᏰᎵᏊ —One language is never enough.
Dr. Whom: Consulting Linguist, Grammarian, Orthoëpist, and Philological Busybody; also copyeditor and proofreader
OpenOffice 4.0.1 on Mac OS X 10.7.5
ᏌᏊ ᎦᏬᏂᏍᏗ ᎥᏝ ᏰᎵᏊ —One language is never enough.
Dr. Whom: Consulting Linguist, Grammarian, Orthoëpist, and Philological Busybody; also copyeditor and proofreader