Is there any to select all the cells which have one word

qazxsw213

New Member
Joined
Apr 28, 2017
Messages
3
For example
Cell A1 contains - For you to understand
Cell A2 contain -- I am
Cell A3 contains = doing
Cell A4 contain - this Thank you


In the above example, Cell A3 has only one word and the rest have more than one word. I want to select all the cells which have only one word.

Thank you
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
I dont know about "selecting" them.
But cells with one word would imply there are no spaces in the cell.
You could use this in a Helper column

in B1
=NOT(ISNUMBER(SEARCH(" ",A1)))+0
and copy down the column

1's indicate cells with one word
 
Upvote 0
Another option would be to use Conditional Formatting to highlight all of the cells with one word (no spaces).

To do this, using your example, highlight A1:A4 > Conditional Formatting > New Rule > Use a formula

=COUNTIF(A1,"* *")=0

Format > Fill however you'd like > OK
 
Upvote 0
Another option would be to use Conditional Formatting to highlight all of the cells with one word (no spaces).

To do this, using your example, highlight A1:A4 > Conditional Formatting > New Rule > Use a formula

=COUNTIF(A1,"* *")=0

Format > Fill however you'd like > OK


Thanks a lot it worked
 
Upvote 0

Forum statistics

Threads
1,224,829
Messages
6,181,218
Members
453,024
Latest member
Wingit77

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