Reputation: 476
I have two tables like below:
Table 1: (element list)
Element | Count
A |
B |
C |
...
Table 2: (element record)
Date | Element
1-1-2020 | A
1-1-2020 | A
4-7-2020 | B
6-9-2020 | C
...
I want to populate the column Count of table 1 with a counter of how many times each element (A,B,C [...]) appears in table 2 where the date is between two dates.
I want to achive this using Google Sheets
Upvotes: 0
Views: 30
Reputation: 7783
=COUNTIFS(Table2!A:A,">="&DATE([year],[month],[day]),Table2!A:A,"<="&DATE([year],[month],[day]),Table2!B:B,A2)
Presumably you could replace the DATE() functions with a reference to a cell that contained your start and end dates.
Upvotes: 2