Excel 2016
In Excel, I'm trying to count all same jobs that have repeated last reasons.
However I only need the last reason and the count of that reason if repeated.
If the reason changes then count stops.
date job reason
31/10/2017 barr skip
30/10/2017 sheep run
29/10/2017 pig run
28/10/2017 barr skip
27/10/2017 barr skip
26/10/2017 sheep run
25/10/2017 pig skip
24/10/2017 barr run
23/10/2017 car skip
22/10/2017 cow run
21/10/2017 car run
20/10/2017 cow skip
20/10/2017 barr skip
so for example table barr has a skip on 31st, 28th and 27th. on the 24th has a job run as no need to count further. so the result would be.
Job Last Reason EMV
barr Skip 3
sheep run 2
pig run 1
car run 1
cow skip 1
Also please note that this data is around 800k in length. so need to be efficient with no access to any database of any form.
I've tried with countifs with no success.