(If this isn't the correct place to ask please let me know.)
I have a template i created to verify time entered on cards and if there are any errors it indicates the amount of time to move to correct it. It works, but i'm just wondering if there is a more simplified way to write the formulas for ST to OT and OT to ST.
Attached some sample data with values to show what it does. If anyone would like to offer some suggestions i would greatly appreciate it
.
Current formula for OT to ST:
=IF(IFERROR(MATCH([@[State / Province]],Canada[State / Province],0),),IF(AND([@ST]<=INDEX(Canada,MATCH([@[State / Province]],Canada[State / Province],0),MATCH(Canada[[#Headers],[Hours]],Canada[#Headers],0)),[@OT]>(INDEX(Canada,MATCH([@[State / Province]],Canada[State / Province],0),MATCH(Canada[[#Headers],[Hours]],Canada[#Headers],0))-[@ST])),INDEX(Canada,MATCH([@[State / Province]],Canada[State / Province],0),MATCH(Canada[[#Headers],[Hours]],Canada[#Headers],0))-[@ST],IF([@[ST to OT]]>0,,[@OT])),IF(AND([@ST]<40,[@OT]>(40-[@ST])),40-[@ST],IF([@[ST to OT]]>=0,,[@OT])))
Current formula for ST to OT:
=IF(IFERROR(MATCH([@[State / Province]],Canada[State / Province],0),),IF([@ST]>=INDEX(Canada,MATCH([@[State / Province]],Canada[State / Province],0),MATCH(Canada[[#Headers],[Hours]],Canada[#Headers],0)),[@ST]-INDEX(Canada,MATCH([@[State / Province]],Canada[State / Province],0),MATCH(Canada[[#Headers],[Hours]],Canada[#Headers],0)),),IF([@ST]>40,[@ST]-40,))
Again this is really just for learning purposes as it works fine, just seems extremely repetitive.
ST-OT - Sample.xlsx
Bookmarks