Counting and unduplicating values based on the date
I have two columns table that has multiple codes and dates like below:
CP 1/1/2019
CP 1/22/2019
WK 1/1/2019
WK 1/1/2019
CP 1/22/2019
I need to count and unduplicate each value during the given month that is dependent on the date: if the code occurred on the same date (WK) above - I only count it once. If the code occurred on different dates - I count it twice unduplicating if need be..
The result for the table above shall look like this:
WK - 1
CP - 2 (counting one that occurred on 1/1/2019 and unduplicating CP that occurred twice on 1/22/2019
I'm struggling to come up with the formula or VBA that would do that.
Thank you,
Art
|