[Solved] Find cells that end in "whatever" or "whatever 2"

Discuss the spreadsheet application
Post Reply
CalcNoob
Posts: 2
Joined: Mon Jan 28, 2008 4:01 pm

[Solved] Find cells that end in "whatever" or "whatever 2"

Post by CalcNoob »

Hi guys,

I have a mile-long list of entries and I want to find all entries that end in "whatever" or "whatever 2".

For example:

spiderman
batman
auqaman
flash
captainamerica
superman
batgirl
supergirl
hulk

I want to find all the entries that end in "man" OR that end in "girl".

Any idea how this is done? I honestly searched the forum and the Calc
help files but couldn't find something.

Thanks in advance for your help,

CalcNoob
Last edited by Hagar Delest on Tue Jun 10, 2008 2:21 pm, edited 2 times in total.
Reason: tagged the thread as Solved.
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Find cells that end in "whatever" or "whatever 2"

Post by acknak »

You can search/find them using Edit > Find & Replace.
Search for: (man|girl)$
Options > Regular expressions: YES
Click "Find All"

However, there is precious little you can do with them once you find them.

Calc can't do anything with multiple selections; you can't even copy them to the clipboard, so I'm not sure it's going to be much use to do it this way.

You can always use "Find" one at a time, but that's pretty tedious.
AOO4/LO5 • Linux • Fedora 23
huw
Volunteer
Posts: 417
Joined: Wed Nov 21, 2007 1:57 pm

Re: Find cells that end in "whatever" or "whatever 2"

Post by huw »

I suspect CalcNoob actually wants to filter, in which case your expression works, so long as Tools > Options... > Calc > Calculate > Search criteria = and <> must apply to whole cells is OFF.

Code: Select all

.*(man|girl)$
will work regardless of that setting, again so long as Regular expression is turned ON in the filter More Options.
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Find cells that end in "whatever" or "whatever 2"

Post by acknak »

Excellent points--thanks huw!

I always forget about using a filter.
AOO4/LO5 • Linux • Fedora 23
CalcNoob
Posts: 2
Joined: Mon Jan 28, 2008 4:01 pm

Re: Find cells that end in "whatever" or "whatever 2" [RESOLVED]

Post by CalcNoob »

Thanks for your replies.

.*(man|girl)$ was *exactly* what I was looking for.

I really appreciate this. ;)

CalcNoob.
Post Reply