View Single Post
  #19   Report Post  
Posted to microsoft.public.excel.programming
Daniel Petta Daniel Petta is offline
external usenet poster
 
Posts: 5
Default Logical based Horizontal Lookup

Thank you Claus.

Is there any way to take the last part of the formula and have it use the same logic defined in the UDF?

The formula you've given me is:
=stime(C64:AX64)&" - "&TEXT((MATCH("",A64:AY64,-1)-2)/48,"hh:mm")

The current formula works perfect for the "start time" of the schedule [stime(C64:AX64)]but the last part of the formula [TEXT((MATCH("",A64:AY64,-1)-2)/48,"hh:mm")] accounts for all hour types [""]. I'd like to make it such that the "end time" or last part of this formula


Here is an example of a shift which has hour types which would be include (like X) and then excluded (like I):
https://www.dropbox.com/s/ui4dtkwprv...1616.xlsm?dl=0

I've tried to set up another UDF (eTime) but I obviously don't know what I'm doing as I'm getting error messages!

Thanks again for your help.