Thread: Count if
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Count if

Assuming your dates are just numbers, we can use a helper column:

In C1 enter:
200811 this is the desired number for column A
In C2 enter:
=IF(A2<C$1,"",B2) and copy down

In A1 thru C7 we see:
Date Text 200811
200811 Cat Cat
200901 Dog
200901 Mouse
200811 Frog Frog
200811 Cat Cat
200901 Bird

Note the unwanted dated are blanked out. Finally use:

=SUMPRODUCT((C2:C1500<"")/COUNTIF(C2:C1500,C2:C1500&""))
which will display 2


--
Gary''s Student - gsnu200848


"Lindsey" wrote:

I need a formula that will count the unique text values of one column with a
specific value in another column. Here is an example:

Date Text
200811 Cat
200901 Dog
200901 Mouse
200811 Frog
200811 Cat
200901 Bird

If the date was 200811, then the unique values would be 2.
If the date was 200901, then the unique values would be 3.

Please let me know if you have any questions, thanks!