The T20 Blast group stage culminated on Friday evening, with the top four from the North and South groups heading to the quarter-finals.
Essex grabbed the final qualification spot in the South group after their match against Glamorgan at Chelmsford was abandoned due to rain.
In the North, Birmingham's shock defeat to Lancashire, meant that Durham's victory over Derbyshire booked them a place in the last eight.
Roy's ton in vain as Essex secure fourth spot in the South
Going into the final set of fixtures, Gloucestershire, Glamorgan and Middlesex were already assured of quarter-final spots, with the top two already having booked home advantage in the last eight.
Following the no result between Essex and Glamorgan, Gloucestershire pounced to secure top spot in the group after beating Middlesex by four wickets in the final over. Having stumbled to 101-5 in the 15th over, an unbeaten 44 from 23 balls by Jack Taylor, including four maximums, handed Gloucester their 10th win of the campaign as the number one seed.
With Gloucester top, Glamorgan's one point saw them remain second, and Middlesex third with Essex completing the quarter-final line-up in fourth.
Those results meant that despite scoring 120 not out from 62 balls, Jason Roy could not power Surrey through to the next round. The England opener smashed an excellent century in his sides 212-4 at the Oval in their 37 run win over Kent, while elsewhere Hampshire stuffed Somerset by 83 runs at the Ageas Bowl, after bowling the visitors out for just 98.
Northants claim home quarter, while Durham take advantage of Birmingham's stumble to qualify
In the North group, Michael Lumb's 69 not out from 26 balls and Dan Christian's unbeaten 54 from 16 deliveries helped Nottinghamshire wrap-up top spot with an eight wicket victory at home against Leicestershire.
Second-place in the North went to Northamptonshire, who despite losing to Yorkshire by 14 runs, did enough to secure a home quarter-final.
Jack Leaning's 64 from 29 balls was the standout innings for Yorkshire in their 177-5, before 41 from Ben Duckett and 64 from captain Alex Wakely helped Northants reach the 159 they needed to finish second in the group.
In the process, Yorkshire also made sure of their place in the final four, with the final spot expected to go to the Birmingham Bears who travelled to Old Trafford to take on bottom side Lancashire.
However, despite only needing 125 for victory, Birmingham collapsed under the pressure and only reached 94-8 from their 20 overs, ending their hopes of progressing. Saqib Mahmood did most of the damage for Lancashire, taking 3-12 from his four overs, which included a maiden as they won by 30 runs.
Birmingham's defeat opened up the final qualifying spot to the winner of the match between Durham and Derbyshire at Chester-le-Street.
A second-wicket partnership of 141 between Durham's Mark Stoneman (82*) and Callum MacLeod (83) powered the home side to a daunting total of 193-2 from their 20 overs.
In their chase, Derbyshire fell 13 runs shot despite 68 from Kiwi, Neil Broom and 44 from skipper Wes Durston. Scott Borthwick picked-up three wickets for the hosts as they move on to the quarter-finals.
Nottinghamshire vs Essex, Monday 8th August
Northamptonshire vs Middlesex, Tuesday 9th August
Gloucestershire vs Durham, Wednesday 10th August
Glamorgan vs Yorkshire, Thursday 11th August