Explanation
If you better group times into buckets that are not the same size (i.e.
12 AM-7 AM, 7 AM-12 PM, etc.)
you’re free to use the VLOOKUP function in approximate match mode.
The problem
There are several ways to group times in Excel.
If you just need to group times by the hour, a pivot table is very quick and easy.
If you’re gonna wanna group times into otherequalbuckets of multiple hours (i.e.
3 hours, 4 hours, etc.)
a nice solution is touse the FLOOR function.
VLOOKUP, in its approximate match mode, allows you to group times into custom intervals of any size.
In the first column, enter the start time for the bucket.
In column two, enter the name of the bucket you want to use.
The table must be sorted by the start time, smallest to largest.
Finally, configure the VLOOKUP function to look up each time in the bucket table with approximate match.
(you’ve got the option to also use TRUE).
Seethis pagefor a full explanation.
VLOOKUP supports approximate and exact matching…