ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Counting conditionally (https://www.excelbanter.com/excel-programming/427243-counting-conditionally.html)

Slim Slender[_2_]

Counting conditionally
 
I have a table with a column that has data like this:
Gov
Br
SAP
Br, SAP
Comp
Br, Gov
Br, SAP
Comp
Br,
SAP

Is there a formula I can put in a cell at the bottom that will count
the occurences of "Br" and return 5 rather than 2? Thanks in advance.

OssieMac

Counting conditionally
 

=COUNTIF(A1:A10,"=*Br*")

--
Regards,

OssieMac


"Slim Slender" wrote:

I have a table with a column that has data like this:
Gov
Br
SAP
Br, SAP
Comp
Br, Gov
Br, SAP
Comp
Br,
SAP

Is there a formula I can put in a cell at the bottom that will count
the occurences of "Br" and return 5 rather than 2? Thanks in advance.


Mike H

Counting conditionally
 
Try this

=SUMPRODUCT((LEFT(A1:A10,2)="Br")*(1))

Mike

"Slim Slender" wrote:

I have a table with a column that has data like this:
Gov
Br
SAP
Br, SAP
Comp
Br, Gov
Br, SAP
Comp
Br,
SAP

Is there a formula I can put in a cell at the bottom that will count
the occurences of "Br" and return 5 rather than 2? Thanks in advance.


Stefi

Counting conditionally
 
=SUMPRODUCT(--ISERROR(SEARCH("br",A1:A10)))

Regards,
Stefi

€˛Slim Slender€¯ ezt Ć*rta:

I have a table with a column that has data like this:
Gov
Br
SAP
Br, SAP
Comp
Br, Gov
Br, SAP
Comp
Br,
SAP

Is there a formula I can put in a cell at the bottom that will count
the occurences of "Br" and return 5 rather than 2? Thanks in advance.


Stefi

Counting conditionally
 
Sorry, this is the right one:
=SUMPRODUCT(--NOT(ISERROR(SEARCH("br",A1:A10))))
stefi


€˛Slim Slender€¯ ezt Ć*rta:

I have a table with a column that has data like this:
Gov
Br
SAP
Br, SAP
Comp
Br, Gov
Br, SAP
Comp
Br,
SAP

Is there a formula I can put in a cell at the bottom that will count
the occurences of "Br" and return 5 rather than 2? Thanks in advance.


Bernd P

Counting conditionally
 
Or
=SUMPRODUCT(1-ISERROR(SEARCH("br",A1:A10)))

Regards,
Bernd

Slim Slender[_2_]

Counting conditionally
 
On Apr 21, 8:02*am, Bernd P wrote:
Or
=SUMPRODUCT(1-ISERROR(SEARCH("br",A1:A10)))

Regards,
Bernd


Thanks to everyone for answers. Problem solved!


All times are GMT +1. The time now is 09:51 AM.

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