Forum Discussion
Bryan123
Oct 28, 2019Brass Contributor
SUMIF or Vlookup - count/sum the number of times based on unique values?
I would like to create a formula that counts how many times a condition appears based dates. For example in my example below, I want to the result to be 2 since Bob appears on separate dates 2 H...
Bryan123
Oct 30, 2019Brass Contributor
Riny_van_Eekelen
Oct 30, 2019Platinum Contributor
Try this one! I created a Pivot table with names in column A and dates in column B. I guess your real list will include more names than just Bob.
The Pivot table refers to a range A:B, so you can add entries without having to update the range. Just refresh the pivot table and add the persons name to be counted if he/she is new (in the area where i have the COUNTIF formulae. Note that you will get a (blank) (blank) in the pivot table. That's because you include all the blank rows in column A:B. These can be ignored.
I chose a "classic layout" to be able to repeat row headers, so that the name is repeated on every row. Then is becomes easy to count the occurrence for each name.
Hope this helps.
- Bryan123Oct 30, 2019Brass ContributorThis would be a shared wb and pivot tables don't refresh if it's shared. I may could unshare it when needed if that's the only option.
Thanks for the suggestion though