[Solved] How to get countif on string

Discuss the spreadsheet application

[Solved] How to get countif on string

Postby Nightare » Sun Oct 02, 2016 1:56 pm

So I have a bunch off cells like the following

Steven James
Carrol Andrew
Jessie Mack
James steven
Kelly steven
Stephen Neal

What I want is to count all cells that contain any form of "Steven" whether it has capitals or not, or it is first word or last word
I thought it was done with the following formula
Code: Select all   Expand viewCollapse view
=countif(A1:A10;"*steven*")

But that's not working. I thought about trying to use the search function but that requires a specific string to be entered to work so that won't work for my purposes.

How can I get this to work?
Last edited by Nightare on Sun Oct 02, 2016 2:40 pm, edited 1 time in total.
OpenOffice 4.1.2on Windows 10
Nightare
 
Posts: 34
Joined: Sun Aug 07, 2016 5:37 pm

Re: How to get countif on string

Postby Villeroy » Sun Oct 02, 2016 2:36 pm

menu:Tools>Options>Calc>Calculation...
1) "Search criteria ... match whole cell" = OFF and then =countif(A1:A10;"steven")
2) "Regular expressions" = ON and then =countif(A1:A10;".*steven.*")
3) Install the latest version of LibreOffice which supports wildcard matching in your =countif(A1:A10;"*steven*").
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28341
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved]How to get countif on string

Postby Nightare » Sun Oct 02, 2016 2:40 pm

Thanks
OpenOffice 4.1.2on Windows 10
Nightare
 
Posts: 34
Joined: Sun Aug 07, 2016 5:37 pm


Return to Calc

Who is online

Users browsing this forum: Hagar Delest and 6 guests