View Single Post
  #1   Report Post  
Pete at FMR
 
Posts: n/a
Default assigning values by intervals

I have data that I would like to assign a number to based on the interval in
which the data's time stamp falls. I am using five minute intervals so I
want to assign the data a number from 1-288 (representing all the 5 min
intervals in a 24 hour day). This is a little to complex for nesting IF
statements. Can I set up a table with a column showing the begining of the
interval and another showing the end with a third containing the number/code
and use some sort of LOOKUP function? Here is an example:

If the data in one row is time stamped 0:06:33 (six minutes and 33 seconds
after midnight) it would fall in the range between 0:05:00 and 0:09:59 which
is the second interval in the table and would therefore return a value of "2".

I am not quite sure how to get the 'between' logic to work since I am not
looking up a set value, like what is normally used for VLOOKUP etc...

Thank you, much appreciation.

Pete