Search column of data to find if cells contain a comma?

ExcelHound

New Member
Joined
Jun 4, 2011
Messages
9
Can anyone help me please?<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
I’m trying to find a way to search a column of data within Excel to detect if a comma exists anywhere within the range to cells?<o:p></o:p>
Idea being A1 is True or False (or other flag value) if range B2:B500 contains a “,”<o:p></o:p>
The comma could be anywhere within any cell within the range. Example of cells within the range:<o:p></o:p>
Dog<o:p></o:p>
Cat<o:p></o:p>
Bunny<o:p></o:p>
,<o:p></o:p>
Dog,<o:p></o:p>
Cat, Dog<o:p></o:p>
Etc<o:p></o:p>
<o:p> </o:p>
I don’t explicitly need to count the number of times a comma is found, although that would be cool, I just need to be able to flag if a comma exists.<o:p></o:p>
<o:p> </o:p>
Many thanks in advance<o:p></o:p>
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Can anyone help me please?<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
I’m trying to find a way to search a column of data within Excel to detect if a comma exists anywhere within the range to cells?<o:p></o:p>
Idea being A1 is True or False (or other flag value) if range B2:B500 contains a “,”<o:p></o:p>
The comma could be anywhere within any cell within the range. Example of cells within the range:<o:p></o:p>
Dog<o:p></o:p>
Cat<o:p></o:p>
Bunny<o:p></o:p>
,<o:p></o:p>
Dog,<o:p></o:p>
Cat, Dog<o:p></o:p>
Etc<o:p></o:p>
<o:p></o:p>
I don’t explicitly need to count the number of times a comma is found, although that would be cool, I just need to be able to flag if a comma exists.<o:p></o:p>
<o:p></o:p>
Many thanks in advance<o:p></o:p>
Try this...

=COUNTIF(B2:B500,"*,*")>0

=COUNTIF(B2:B500,"*,*")
 
Upvote 0

Forum statistics

Threads
1,214,430
Messages
6,119,454
Members
448,898
Latest member
drewmorgan128

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