View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
barry houdini[_4_] barry houdini[_4_] is offline
external usenet poster
 
Posts: 57
Default same time range on different days

Assuming that any time outside those periods should give a blank try

=IF(A1="","",LOOKUP(MOD(A1,1)*24,{0,1,7,8.5,11.5,1 4,17,20,23},
{"midnight","","breakfast","","lunch","","dinner", "","midnight"}))