View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Andy Andy is offline
external usenet poster
 
Posts: 10
Default Count occurances based on certain data

Simon

Try DCOUNTA

You need column headers for your data. If it starts in cell A1 and
looks like this:

A B C D
1 Ref No. Colour Figure
2 aa 0123* *red ** 3
3 ab 0125* *red ** 3
4 ac 0452* *blue * 5
5 ba 0478* *white 12
6 bb 0845* *white 1
7 bc 0654* *red ** 54

Then you need to add criteria (I have assumed this is added in cells A11
to D12 as follows:

A B C D
11 Ref No. Colour Figure
12 b* <4

I have included No. and Colour in case you want to get more specific
with your criteria.

The formula is then:

=DCOUNTA(A1:D7,"Colour",A11:D12)

and this gives me the answer "1".

Hope that helps

Andy

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!