Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default 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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default 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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default 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.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default 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.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 806
Default Counting conditionally

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

Regards,
Bernd
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default 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!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
A UDF for Counting Coloured Cells that are conditionally formatted NeilG New Users to Excel 5 November 1st 09 12:45 AM
counting unique values conditionally jake Excel Discussion (Misc queries) 7 March 3rd 09 04:16 AM
Counting conditionally formatted cells Kebbon Excel Worksheet Functions 2 October 12th 06 01:48 PM
Conditionally format Terri Excel Programming 1 November 15th 04 08:06 PM
Counting a colour that is Conditionally Formatted Crash[_2_] Excel Programming 4 November 9th 03 06:03 PM


All times are GMT +1. The time now is 11:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"