ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If a comma is found (https://www.excelbanter.com/excel-discussion-misc-queries/213239-if-comma-found.html)

David P.

If a comma is found
 
How would I do this?:

=IF(A comma is found in A1),...

Thanks.
--
David P.

Max

If a comma is found
 
=IF(A comma is found in A1),...

=IF(ISNUMBER(SEARCH(",",A1)), ...
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:21,000 Files:365 Subscribers:65
xdemechanik
---


T. Valko

If a comma is found
 
Another one:

=IF(COUNT(FIND(",",A1)),.....

Note that this doesn't work on numbers using a number comma format (10,000)


--
Biff
Microsoft Excel MVP


"David P." wrote in message
...
How would I do this?:

=IF(A comma is found in A1),...

Thanks.
--
David P.




Joerg Mochikun

If a comma is found
 
Assumes that A1 contains text:
=IF(ISERROR(FIND(",",A1)),"comma not found","comma found")

Joerg

"David P." wrote in message
...
How would I do this?:

=IF(A comma is found in A1),...

Thanks.
--
David P.




Rick Rothstein

If a comma is found
 
Here is another approach...

=IF(LEN(A1)=LEN(SUBSTITUTE(A1,",","")),"No comma","There's a comma")

--
Rick (MVP - Excel)


"David P." wrote in message
...
How would I do this?:

=IF(A comma is found in A1),...

Thanks.
--
David P.



Dave Peterson

If a comma is found
 
One mo

=if(countif(a1,"*,*")0,"found","not found")

David P. wrote:

How would I do this?:

=IF(A comma is found in A1),...

Thanks.
--
David P.


--

Dave Peterson

Rick Rothstein

If a comma is found
 
I like this one best... one function call. Let's remove the comparison just
to shorten it up a bit...

=IF(COUNTIF(A1,"*,*"),"found","not found")

--
Rick (MVP - Excel)


"Dave Peterson" wrote in message
...
One mo

=if(countif(a1,"*,*")0,"found","not found")

David P. wrote:

How would I do this?:

=IF(A comma is found in A1),...

Thanks.
--
David P.


--

Dave Peterson



Dave Peterson

If a comma is found
 
I find using the comparison self-documenting.

Rick Rothstein wrote:

I like this one best... one function call. Let's remove the comparison just
to shorten it up a bit...

=IF(COUNTIF(A1,"*,*"),"found","not found")

--
Rick (MVP - Excel)

"Dave Peterson" wrote in message
...
One mo

=if(countif(a1,"*,*")0,"found","not found")

David P. wrote:

How would I do this?:

=IF(A comma is found in A1),...

Thanks.
--
David P.


--

Dave Peterson


--

Dave Peterson

Rick Rothstein

If a comma is found
 
That is true enough (but I would guess doing introduces an extra, albeit
very quick, calculation to the formula).

--
Rick (MVP - Excel)


"Dave Peterson" wrote in message
...
I find using the comparison self-documenting.

Rick Rothstein wrote:

I like this one best... one function call. Let's remove the comparison
just
to shorten it up a bit...

=IF(COUNTIF(A1,"*,*"),"found","not found")

--
Rick (MVP - Excel)

"Dave Peterson" wrote in message
...
One mo

=if(countif(a1,"*,*")0,"found","not found")

David P. wrote:

How would I do this?:

=IF(A comma is found in A1),...

Thanks.
--
David P.

--

Dave Peterson


--

Dave Peterson



Dave Peterson

If a comma is found
 
I think it makes the formula easier to understand -- especially for the posters
who are asking this type of question.

And it may make it easier to use the function in different formulas.



Rick Rothstein wrote:

That is true enough (but I would guess doing introduces an extra, albeit
very quick, calculation to the formula).

--
Rick (MVP - Excel)

"Dave Peterson" wrote in message
...
I find using the comparison self-documenting.

Rick Rothstein wrote:

I like this one best... one function call. Let's remove the comparison
just
to shorten it up a bit...

=IF(COUNTIF(A1,"*,*"),"found","not found")

--
Rick (MVP - Excel)

"Dave Peterson" wrote in message
...
One mo

=if(countif(a1,"*,*")0,"found","not found")

David P. wrote:

How would I do this?:

=IF(A comma is found in A1),...

Thanks.
--
David P.

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson


All times are GMT +1. The time now is 12:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com