Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9786

Formula to return count of duplicate dates based on multiple criteria

$
0
0

In Google Sheets, I have a column of dates in A and checkboxes in column B (Redeemed).

  1. I want a formula to count, for each unique date, how many times it appears in the column where the following two conditions are also met:

    1. The date is in the same month as a lookup date in D2
    2. The checkbox in the date's row is TRUE (ticked)
  2. I want to use that count to calculate:

    1. In E3, the sum of the count
    2. In E4, the number of times the count includes the number 2
    3. In E5, the number of times it includes the number 3
    4. In E6, the number of times it includes a number >=3

Example Showing Results E3:E6

In the example above,

  1. E4=11 because there are 11 dates in the month of October, 2023 (lookup month) that also have their "Redeemed" checkbox ticked.
  2. E5=1 because there is only one date, 10/2/2023, that appears exactly twice, is in the lookup month, and has the "Redeemed" checkbox ticked.
  3. E6=1, only 10/5/2023 appears exactly 3 times and meets the other conditions
  4. E7=2, 10/5/2023 and 10/10/2023 appear 3 or more times and meet the other conditions.

Viewing all articles
Browse latest Browse all 9786

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>