Excel formula for categorising dates & times into billing codes

%3CLINGO-SUB%20id%3D%22lingo-sub-2597749%22%20slang%3D%22en-US%22%3EExcel%20formula%20for%20categorising%20dates%20%26amp%3B%20times%20into%20billing%20codes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2597749%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20convert%20timesheet%20data%20into%20billable%20codes%20according%20to%20the%20following%20rules.%26nbsp%3B%20Any%20assistance%20would%20be%20greatly%20appreciated!%26nbsp%3B%20I%20have%20attached%20the%20spreadsheet%20with%20sample%20timesheet%20data%20and%20lookup%20codes%3C%2FP%3E%3CTABLE%20width%3D%22952%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%22135.984px%22%20height%3D%2230px%22%3EItem%20Number%3C%2FTD%3E%3CTD%20width%3D%22340.594px%22%20height%3D%2230px%22%3EItem%20Name%20and%20Notes%3C%2FTD%3E%3CTD%20width%3D%22474.422px%22%20height%3D%2230px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22135.984px%22%20height%3D%22111px%22%3E01_011_0107_1_1%3C%2FTD%3E%3CTD%20width%3D%22340.594px%22%20height%3D%22111px%22%3EAssistance%20with%20Self-Care%20Activities%20-%20Standard%20-%20Weekday%20Daytime%3C%2FTD%3E%3CTD%20width%3D%22474.422px%22%20height%3D%22111px%22%3EA%20Weekday%20Daytime%20Support%20is%20any%20support%20to%20an%20individual%20participant%20that%20starts%20at%20or%20after%206%3A00%20am%20and%20ends%20before%20or%20at%208%3A00%20pm%20on%20a%20single%20weekday%20(unless%20that%20support%20is%20a%20Public%20Holiday%20Support%20or%20a%20Night-time%20Sleepover%20Support).%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22135.984px%22%20height%3D%22111px%22%3E01_015_0107_1_1%3C%2FTD%3E%3CTD%20width%3D%22340.594px%22%20height%3D%22111px%22%3EAssistance%20with%20Self-Care%20Activities%20-%20Standard%20-%20Weekday%20Evening%3C%2FTD%3E%3CTD%20width%3D%22474.422px%22%20height%3D%22111px%22%3EA%20Weekday%20Evening%20Support%20is%20any%20support%20to%20an%20individual%20participant%20that%20starts%20after%208%3A00%20pm%20and%20finishes%20at%20or%20before%20midnight%20on%20a%20single%20weekday%20(unless%20that%20support%20is%20a%20Public%20Holiday%20Support%20or%20a%20Night-time%20Sleepover%20Support).%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22135.984px%22%20height%3D%22165px%22%3E01_002_0107_1_1%3C%2FTD%3E%3CTD%20width%3D%22340.594px%22%20height%3D%22165px%22%3EAssistance%20with%20Self-Care%20Activities%20-%20Standard%20-%20Weekday%20Night%3C%2FTD%3E%3CTD%20width%3D%22474.422px%22%20height%3D%22165px%22%3EA%20Weekday%20Night%20Support%20is%20any%20support%20to%20an%20individual%20participant%20that%20commences%20at%20or%20before%20midnight%20on%20a%20weekday%20and%20finishes%20after%20midnight%20on%20that%20weekday%2C%20or%20commences%20before%206%3A00%20am%20on%20a%20weekday%20and%20finishes%20on%20that%20weekday%20(unless%20that%20support%20is%20a%20Public%20Holiday%20Support%2C%20Saturday%20Support%2C%20Sunday%20Support%20or%20a%20Night-time%20Sleepover%20Support).%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22135.984px%22%20height%3D%22138px%22%3E01_013_0107_1_1%3C%2FTD%3E%3CTD%20width%3D%22340.594px%22%20height%3D%22138px%22%3EAssistance%20with%20Self-Care%20Activities%20-%20Standard%20-%20Saturday%3C%2FTD%3E%3CTD%20width%3D%22474.422px%22%20height%3D%22138px%22%3EA%20Saturday%20Support%20is%20any%20support%20to%20an%20individual%20participant%20that%20starts%20at%20or%20after%20midnight%20on%20the%20night%20prior%20to%20a%20Saturday%20and%20ends%20before%20or%20at%20midnight%20of%20that%20Saturday%20(unless%20that%20support%20is%20a%20Public%20Holiday%20Support%20or%20a%20Night-time%20Sleepover%20Support).%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22135.984px%22%20height%3D%22111px%22%3E01_014_0107_1_1%3C%2FTD%3E%3CTD%20width%3D%22340.594px%22%20height%3D%22111px%22%3EAssistance%20with%20Self-Care%20Activities%20-%20Standard%20-%20Sunday%3C%2FTD%3E%3CTD%20width%3D%22474.422px%22%20height%3D%22111px%22%3EA%20Sunday%20Support%20is%20any%20support%20to%20an%20individual%20participant%20that%20starts%20at%20or%20after%20midnight%20on%20the%20night%20prior%20to%20a%20Sunday%20and%20ends%20before%20or%20at%20midnight%20of%20that%20Sunday%20(unless%20that%20support%20is%20a%20Public%20Holiday%20Support%20or%20a%20Night-time%20Sleepover%20Support).%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22135.984px%22%20height%3D%22111px%22%3E01_012_0107_1_1%3C%2FTD%3E%3CTD%20width%3D%22340.594px%22%20height%3D%22111px%22%3EAssistance%20with%20Self-Care%20Activities%20-%20Standard%20-%20Public%20Holiday%3C%2FTD%3E%3CTD%20width%3D%22474.422px%22%20height%3D%22111px%22%3EA%20Public%20Holiday%20Support%20is%20any%20support%20to%20an%20individual%20participant%20that%20starts%20at%20or%20after%20midnight%20on%20the%20night%20prior%20to%20a%20Public%20Holiday%20and%20ends%20before%20or%20at%20midnight%20of%20that%20Public%20Holiday%20(unless%20that%20support%20is%20a%20Night-time%20Sleepover%20Support).%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%22135.984px%22%20height%3D%22246px%22%3E01_010_0107_1_1%3C%2FTD%3E%3CTD%20width%3D%22340.594px%22%20height%3D%22246px%22%3EAssistance%20with%20Self-Care%20Activities%20-%20Night-Time%20Sleepover%3C%2FTD%3E%3CTD%20width%3D%22474.422px%22%20height%3D%22246px%22%3E%3CP%3EA%20Night-time%20Sleepover%20Support%20is%20any%20support%20to%20an%20individual%20participant%20delivered%20on%20a%20weekday%2C%20a%20Saturday%2C%20a%20Sunday%20or%20a%20Public%20Holiday%20that%3A%3CBR%20%2F%3Eo%26nbsp%3B%20commences%20before%20midnight%20on%20a%20given%20day%20and%20finishes%20after%20midnight%20on%20that%20day%3B%20and%3CBR%20%2F%3Eo%26nbsp%3B%20is%20for%20a%20continuous%20period%20of%20eight%20(8)%20hours%20or%20more%3B%20and%3CBR%20%2F%3Eo%26nbsp%3B%20the%20worker%20is%20allowed%20to%20sleep%20when%20they%20are%20not%20providing%20support.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2597749%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2601328%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20formula%20for%20categorising%20dates%20%26amp%3B%20times%20into%20billing%20codes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2601328%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%20and%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F425987%22%20target%3D%22_blank%22%3E%40mathetes%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20the%20feedback.%26nbsp%3B%20I%20have%20attached%20a%20manually%20completed%20timesheet%20to%20show%20what%20I%20am%20trying%20to%20'automate'.%26nbsp%3B%20My%20plan%20is%20to%20download%20timesheet%20data%20into%20a%20workbook%20and%20have%20a%20new%20sheet%20that%20converts%20the%20data%20in%20each%20timesheet%20row%20into%20a%20billing%20item%20number%20based%20on%20days%20%26amp%3B%20time%20worked.%26nbsp%3B%20I%20thought%20I%20could%20achieve%20this%20via%20nested%20IF%2FAND%20statements%2C%20but%20couldn't%20make%20it%20work.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUnfortunately%2C%20as%20convoluted%20as%20they%20are%2C%20I%20can't%20change%20the%20billing%20codes%20(AU%20government-issued).%20The%20descriptions%20for%20the%20use%20of%20the%20codes%20are%20outlined%20in%20the%20National%20Disability%20Insurance%20Scheme%20(NDIS)%20price%20arrangements%20and%20limits%20guide-%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.ndis.gov.au%2Fmedia%2F3374%2Fdownload%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.ndis.gov.au%2Fmedia%2F3374%2Fdownload%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2597981%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20formula%20for%20categorising%20dates%20%26amp%3B%20times%20into%20billing%20codes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2597981%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1118282%22%20target%3D%22_blank%22%3E%40Vanessa000%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20addition%20to%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F425987%22%20target%3D%22_blank%22%3E%40mathetes%3C%2FA%3E%26nbsp%3Bcomment.%20You%20say%20%22%3CSPAN%3EI%20am%20trying%20to%20convert%20timesheet%20data%20into%20billable%20codes%22%20-%20could%20you%20show%20what%20you%20try%20to%20do%2C%20even%20if%20result%20is%20not%20correct.%20Or%20you'd%20like%20someone%20from%20us%20does%20this%20project%26nbsp%3Bfrom%20scratch%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2597956%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20formula%20for%20categorising%20dates%20%26amp%3B%20times%20into%20billing%20codes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2597956%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1118282%22%20target%3D%22_blank%22%3E%40Vanessa000%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou've%20had%20a%20lot%20of%20views%2C%20but%20no%20replies%20yet.%20My%20guess%20is%20that%20your%20situation%20still%20needs%20more%20clarification%20in%20order%20for%20anybody%20to%20give%20the%20help%20you're%20seeking.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAmong%20other%20things%2C%20most%20of%20the%20%22Timesheet%22%20data%20you%20give%20in%20your%20example%20file%20seems%20straight%20forward...%20it%20might%20be%20helpful%20if%20you%20gave%20(and%20marked)%20an%20example%20of%20a%20timesheet%20entry%20that%20met%20each%20of%20the%20codes%20you're%20seeking%20to%20identify.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnd%20if%20I%20might%20ask%2C%20are%20those%20%22Item%20Number%22%20entries%20the%20codes%20that%20you%20are%20wanting%20to%20look%20up%3F%20Is%20it%20necessary%20that%20they%20be%20so%20abstruse%20in%20nature%3F%20Even%20the%20entries%20under%20%22Item%20Name%20and%20Notes%22%20are%20minimally%20different--i.e.%2C%20ALL%20of%20them%20begin%20with%20the%20same%20five%20words%2C%20six%20if%20you%20include%20the%20%22Standard%22--so%20the%20only%20differentiation%20is%20the%20day-and-times%20of%20the%20service....%20%26nbsp%3B%20%26nbsp%3B%20I%20can%20see%20why%20it's%20not%20easy%20to%20decode%3B%20the%20table%20that's%20supposed%20to%20help%20do%20that%20decoding%2Fencoding%20needs%20its%20own%20decoding.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELooking%20at%20the%20Timesheet%2C%20there's%20one%20(highlighted%20with%20a%20purple%20background)%20that%20appears%20to%20End%20before%20it%20Starts--and%20of%20the%20three%20highlighted%20in%20yellow%20that%20might%20be%20thought%20of%20as%20%22overnight%22%20only%20one%20accounts%20for%20eight%20or%20more%20hours%3B%20is%20it%20the%20only%20one%20that%20qualifies%20as%20truly%20%22overnight%22.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22mathetes_0-1627917782895.png%22%20style%3D%22width%3A%20524px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F299875i17FE62171644B16B%2Fimage-dimensions%2F524x473%3Fv%3Dv2%22%20width%3D%22524%22%20height%3D%22473%22%20role%3D%22button%22%20title%3D%22mathetes_0-1627917782895.png%22%20alt%3D%22mathetes_0-1627917782895.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20any%20event%2C%20you%20can%20help%20us%20help%20you%20if%20you%20were%20to%20provide%20a%20Timesheet%20example%20where%20you've%20laid%20out%20the%20%22correct%20code%22%20that%20corresponds%2C%20with%20any%20notation%20that%20might%20help%20explain%20where%20it%20might%20otherwise%20be%20ambiguous.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2604608%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20formula%20for%20categorising%20dates%20%26amp%3B%20times%20into%20billing%20codes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2604608%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1118282%22%20target%3D%22_blank%22%3E%40Vanessa000%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThat%20new%20spreadsheet%20has%20a%20totally%20different%20format%20for%20the%20dates%20and%20times%3B%20different%2C%20that%20is%2C%20from%20the%20first%20one%20that%20you%20posted.%20In%20the%20first%2C%20you%20had%20start%20dates%20and%20start%20times%2C%20as%20well%20as%20end%20dates%20and%20end%20times.%20In%20these%20it%20doesn't%20appear%20that%20any%20different%20end%20dates%20exist%2C%20that%20entries%20that%20might%20have%20either%20begin%20or%20end%20at%20midnight%20rather%20than%20flipping%20over%20from%20one%20day%20to%20the%20next.%20It%20also%20doesn't%20look%20like%20you've%20covered%20every%20possibility%20in%20terms%20of%20the%20codes.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFrankly%2C%20I%20find%20it%20a%20bit%20odd%20that%20each%20of%20the%20lines%20that%20you've%20coded%20as%20eligible%20for%20%22Overnight%20Allowance%22%20begin%20at%20midnight%20and%20end%20at%206%20a.m.%20%26nbsp%3BIt%20sounds%20more%20like%20people%20retro-fitting%20times%20to%20meet%20criteria%2C%20rather%20than%20posting%20actual%20times%20(humans%20just%20aren't%20THAT%20precise%20in%20their%20real%20times%20of%20checking%20in%20and%20out).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20any%20event%2C%20to%20the%20extent%20that%20you%20might%20want%20to%20resolve%20this%20on%20your%20own%2C%20given%20the%20convoluted%20nature%20of%20the%20codes%20and%20the%20conditions%20that%20underlie%20the%20codes%2C%20I%20would%20suggest%20you%20NOT%20try%20to%20write%20a%20single%20formula%20to%20include%20all%20of%20the%20calculations%20and%20comparisons%20along%20with%20ANDs%20nested%20in%20IFs%2C%20which%20probably%20would%20be%20possible%20but%20would%20end%20up%20being%20virtually%20unintelligible%20(kind%20of%20like%20this%20sentence).%20Seriously%2C%20the%20more%20you%20can%20simplify%20the%20better%20for%20those%20who%20come%20after%20you.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EInstead%3A%3C%2FP%3E%3CUL%3E%3CLI%3EYou%20can%20create%20a%20single%20field%20that%20includes%20both%20date%20and%20time%20for%20start%20and%20finish.%20I've%20attached%20an%20example%20file.%3C%2FLI%3E%3CLI%3EThen%2C%20with%20that%2C%20you%20can%26nbsp%3Bcreate%20what%20are%20often%20called%20%22helper%20columns%22%20that%2C%20one-by-one%2C%20test%20for%20each%20possible%20condition%2C%20and%20produce%20a%20simple%20result.%26nbsp%3BFor%20example%3A%3CUL%3E%3CLI%3E%3DIF(EndDate%3DStartDate%2C%22Y%22%2C%22N%22)%3C%2FLI%3E%3CLI%3ESubtract%20Start%20from%20End%20to%20get%20number%20of%20hours%20(multiply%20the%20resulting%20fraction%20of%20a%20day%20by%2024%20to%20get%20hours)%3C%2FLI%3E%3CLI%3EUse%20WEEKDAY%20function%20to%20determine%20what%20day%20of%20week%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3ETHEN%2C%20with%20those%20as%20the%20basis%20for%20your%20various%20conditions%2C%20you%20should%20be%20able%20to%20write%20an%20IF%20(or%20an%20IFS)%20statement%20that%20looks%20at%20the%20various%20conditions%20and%20determines%20the%20appropriate%20codes.%20I'm%20going%20to%20leave%20that%20to%20you--since%20you%20understand%20your%20codes--or%20somebody%20more%20interested%20in%20the%20minutia%20than%20I.%20I've%20created%20the%20helper%20columns%20based%20on%20your%20first%20posting.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi

I am trying to convert timesheet data into billable codes according to the following rules.  Any assistance would be greatly appreciated!  I have attached the spreadsheet with sample timesheet data and lookup codes

Item NumberItem Name and Notes 
01_011_0107_1_1Assistance with Self-Care Activities - Standard - Weekday DaytimeA Weekday Daytime Support is any support to an individual participant that starts at or after 6:00 am and ends before or at 8:00 pm on a single weekday (unless that support is a Public Holiday Support or a Night-time Sleepover Support).
01_015_0107_1_1Assistance with Self-Care Activities - Standard - Weekday EveningA Weekday Evening Support is any support to an individual participant that starts after 8:00 pm and finishes at or before midnight on a single weekday (unless that support is a Public Holiday Support or a Night-time Sleepover Support).
01_002_0107_1_1Assistance with Self-Care Activities - Standard - Weekday NightA Weekday Night Support is any support to an individual participant that commences at or before midnight on a weekday and finishes after midnight on that weekday, or commences before 6:00 am on a weekday and finishes on that weekday (unless that support is a Public Holiday Support, Saturday Support, Sunday Support or a Night-time Sleepover Support).
01_013_0107_1_1Assistance with Self-Care Activities - Standard - SaturdayA Saturday Support is any support to an individual participant that starts at or after midnight on the night prior to a Saturday and ends before or at midnight of that Saturday (unless that support is a Public Holiday Support or a Night-time Sleepover Support).
01_014_0107_1_1Assistance with Self-Care Activities - Standard - SundayA Sunday Support is any support to an individual participant that starts at or after midnight on the night prior to a Sunday and ends before or at midnight of that Sunday (unless that support is a Public Holiday Support or a Night-time Sleepover Support).
01_012_0107_1_1Assistance with Self-Care Activities - Standard - Public HolidayA Public Holiday Support is any support to an individual participant that starts at or after midnight on the night prior to a Public Holiday and ends before or at midnight of that Public Holiday (unless that support is a Night-time Sleepover Support).
01_010_0107_1_1Assistance with Self-Care Activities - Night-Time Sleepover

A Night-time Sleepover Support is any support to an individual participant delivered on a weekday, a Saturday, a Sunday or a Public Holiday that:
o  commences before midnight on a given day and finishes after midnight on that day; and
o  is for a continuous period of eight (8) hours or more; and
o  the worker is allowed to sleep when they are not providing support.

 

  

 

 

 

 

 

 

 

 

 

4 Replies

@Vanessa000 

 

You've had a lot of views, but no replies yet. My guess is that your situation still needs more clarification in order for anybody to give the help you're seeking.

 

Among other things, most of the "Timesheet" data you give in your example file seems straight forward... it might be helpful if you gave (and marked) an example of a timesheet entry that met each of the codes you're seeking to identify.

 

And if I might ask, are those "Item Number" entries the codes that you are wanting to look up? Is it necessary that they be so abstruse in nature? Even the entries under "Item Name and Notes" are minimally different--i.e., ALL of them begin with the same five words, six if you include the "Standard"--so the only differentiation is the day-and-times of the service....     I can see why it's not easy to decode; the table that's supposed to help do that decoding/encoding needs its own decoding.

 

Looking at the Timesheet, there's one (highlighted with a purple background) that appears to End before it Starts--and of the three highlighted in yellow that might be thought of as "overnight" only one accounts for eight or more hours; is it the only one that qualifies as truly "overnight".

mathetes_0-1627917782895.png

 

In any event, you can help us help you if you were to provide a Timesheet example where you've laid out the "correct code" that corresponds, with any notation that might help explain where it might otherwise be ambiguous.

@Vanessa000 

In addition to @mathetes comment. You say "I am trying to convert timesheet data into billable codes" - could you show what you try to do, even if result is not correct. Or you'd like someone from us does this project from scratch?

Hi @Sergei Baklan  and @mathetes 

Thanks for the feedback.  I have attached a manually completed timesheet to show what I am trying to 'automate'.  My plan is to download timesheet data into a workbook and have a new sheet that converts the data in each timesheet row into a billing item number based on days & time worked.  I thought I could achieve this via nested IF/AND statements, but couldn't make it work.

 

Unfortunately, as convoluted as they are, I can't change the billing codes (AU government-issued). The descriptions for the use of the codes are outlined in the National Disability Insurance Scheme (NDIS) price arrangements and limits guide- https://www.ndis.gov.au/media/3374/download

 

 

@Vanessa000 

 

That new spreadsheet has a totally different format for the dates and times; different, that is, from the first one that you posted. In the first, you had start dates and start times, as well as end dates and end times. In these it doesn't appear that any different end dates exist, that entries that might have either begin or end at midnight rather than flipping over from one day to the next. It also doesn't look like you've covered every possibility in terms of the codes.

 

Frankly, I find it a bit odd that each of the lines that you've coded as eligible for "Overnight Allowance" begin at midnight and end at 6 a.m.  It sounds more like people retro-fitting times to meet criteria, rather than posting actual times (humans just aren't THAT precise in their real times of checking in and out).

 

In any event, to the extent that you might want to resolve this on your own, given the convoluted nature of the codes and the conditions that underlie the codes, I would suggest you NOT try to write a single formula to include all of the calculations and comparisons along with ANDs nested in IFs, which probably would be possible but would end up being virtually unintelligible (kind of like this sentence). Seriously, the more you can simplify the better for those who come after you. 

 

Instead:

  • You can create a single field that includes both date and time for start and finish. I've attached an example file.
  • Then, with that, you can create what are often called "helper columns" that, one-by-one, test for each possible condition, and produce a simple result. For example:
    • =IF(EndDate=StartDate,"Y","N")
    • Subtract Start from End to get number of hours (multiply the resulting fraction of a day by 24 to get hours)
    • Use WEEKDAY function to determine what day of week

THEN, with those as the basis for your various conditions, you should be able to write an IF (or an IFS) statement that looks at the various conditions and determines the appropriate codes. I'm going to leave that to you--since you understand your codes--or somebody more interested in the minutia than I. I've created the helper columns based on your first posting.