Filter for a single- and two-character word

YoupC

New Member
Joined
Sep 22, 2017
Messages
2
I have a spreadsheet that contains text strings in Dutch. I'm trying to single out all the rows that contain either the Dutch words "u" or "uw." Both words will have a trailing space, a leading space or both, depending on where they occur in the text string.

Is there a way to filter for these words including one or two spaces?

I've been trying all kinds of filter settings to do this, but can't figure out how to add spaces to the search items when creating the text filter. Excel ignores the spaces when I just add them to the search string. The result is that also strings containing words that include these two characters, like "jouw" or "zult", show up.

Anybody any suggestions? Thanks!

Using Excel 2016 on W10
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Welcome to Mr Excel

Try Advanced Filter + a formula
Something like this

Before filter

A
B
C
1
Text​
2
xxxx uxyx vguwx​
FALSE​
3
uw vgty​
4
xxx uw​
5
xxx uw zzzz​
6
u xxxx​
7
xxxx u​
8
uxxx uwzzz​
9
uzzz uwxxxx​

<tbody>
</tbody>


Leave C1 blank

Formula in C2
=OR(ISNUMBER(SEARCH(" "&"u"&" "," "&A2&" ")),ISNUMBER(SEARCH(" "&"uw"&" "," "&A2&" ")))

Apply Advanced Filter
List Range: $A$1:$A$9
Criteria Range:$C$1:$C$2

After adv filter

A
1
Text​
3
uw vgty​
4
xxx uw​
5
xxx uw zzzz​
6
u xxxx​
7
xxxx u​

<tbody>
</tbody>


Hope this helps

M.
 
Upvote 0

Forum statistics

Threads
1,215,370
Messages
6,124,526
Members
449,169
Latest member
mm424

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top