Count excluding duplicates

I am trying to count uniques values in a column (say Column A) so not to include any duplicates. However I only want to count the values if the month in a nother column (say Column B) is the month of March.

The below formula works when counting to remove the dupllcates

=SUMPRODUCT(A:A<>””)/COUNTIF(A:A,A:A&””))

However as soon as I introduce an IF statement as shown below to only apply when the month is “March” it fails. Any suggestions to correct this?

IF(B:B=”March”,SUMPRODUCT(A:A<>””)/COUNTIF(A:A,A:A&””))

So in the below example I would expect the outcome to be 2

  Column A Column B
  Event Month
Row 2 Fake 1 March
Row 3 Fake 1 March
Row 4 Fake 2 March
Row 5 Fake 3 April
Row 6 Fake 3 April

By: Scott Newman

Leave a Reply

Your email address will not be published. Required fields are marked *