Repeat for Annually, Quarterly between 2 dates

%3CLINGO-SUB%20id%3D%22lingo-sub-2399784%22%20slang%3D%22en-US%22%3ERepeat%20for%20Annually%2C%20Quarterly%20between%202%20dates%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2399784%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20experts%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20not%20sure%20if%20I%20will%20get%20a%20response%20here%20but%20thought%20I%20would%20ask%20anyways%20to%20check%20if%20an%20expert%20has%20a%20suggestion%2Fsolution.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20file%20with%20due%20dates%20based%20on%20if%20the%20frequency%20is%20either%20annually%20or%20quarterly.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20annual%2C%20use%20one%20formula%20(cell%20D4)%3C%2FP%3E%3CP%3EIf%20quarterly%2C%20use%20another.%20(cell%20D5)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20want%20to%20repeat%20t%20for%20the%20number%20of%20%22hits%22%20for%20annually%20and%20quarterly%20between%20the%20Start%20Date%20and%20End%20Date.%26nbsp%3B%20I%20need%20the%20result%20to%20be%20in%201%20column.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20assume%20a%20solution%20would%20be%20in%20VBA%20code%20(some%20kind%20of%20loop..Im%20not%20a%20programmer).%26nbsp%3B%20Kindly%20see%20the%20attached%20file%20with%20sample%20data.%26nbsp%3B%20%26nbsp%3BAfter%20viewing%2C%20I%20think%20you%20will%20be%20able%20to%20see%20more%20clearly%20what%20I%20am%20trying%20to%20do.%26nbsp%3B%20%26nbsp%3BSorry%20for%20any%20confusion%20but%20its%20better%20to%20look%20at%20the%20file%20to%20understand%20completely.%26nbsp%3B%20The%20difficult%20part%20to%20me%20is%20repeating%20only%20between%20the%20start%20date%20and%20end%20date.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGrateful%20for%20your%20assistance%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2399784%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2399837%22%20slang%3D%22en-US%22%3ERe%3A%20Repeat%20for%20Annually%2C%20Quarterly%20between%202%20dates%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2399837%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1029845%22%20target%3D%22_blank%22%3E%40Tony2021%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20can%20definitely%20be%20done%20via%20formula%3B%20no%20need%20for%20VBA.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%2C%20it's%20not%20clear%20to%20me--your%20formulas%20make%20no%20reference%20to%20them--what%20the%20numbers%2090%20and%2060%20have%20to%20do%20with%20anything%20in%20here.%20If%20you%20can%20clear%20that%20up....%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20other%20observation%2C%20though%3A%20you%20clearly--from%20the%20formula%20you%20HAVE%20written--are%20quite%20conversant%20with%20Excel%20and%20Excel%20functions.%20I%20wonder%20why%20you%20haven't%20tried%20just%20a%20little%20bit%20harder%20to%20write%20your%20own%20solution%3B%20it's%20much%20more%20satisfying.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20point%20you%20in%20two%20directions%2C%20directions%20I'd%20go%20in%20to%20resolve%20your%20situation.%20One%20is%20the%20%3CSTRONG%3EIFS%3C%2FSTRONG%3E%20function%2C%20whereby%20you%20could%20write%20a%20single%20formula%20that%20would%20give%20you%20your%20results%20whether%20annual%20OR%20quarterly.%20%3CA%20href%3D%22https%3A%2F%2Fexceljet.net%2Fexcel-functions%2Fexcel-ifs-function%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fexceljet.net%2Fexcel-functions%2Fexcel-ifs-function%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20other%2C%20more%20recently%20released%20(and%20needing%20the%20newest%20version%20of%20Excel)%2C%20and%20more%20powerful%2C%20is%20the%20%3CSTRONG%3ELET%3C%2FSTRONG%3E%20function.%20It%20can%20help%20make%20a%20formula%20more%20efficient%20where%20there%20are%20repetitions%20of%20major%20portions%20of%20a%20formula.%20%3CA%20href%3D%22https%3A%2F%2Fexceljet.net%2Fexcel-functions%2Fexcel-let-function%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fexceljet.net%2Fexcel-functions%2Fexcel-let-function%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2399841%22%20slang%3D%22en-US%22%3ERe%3A%20Repeat%20for%20Annually%2C%20Quarterly%20between%202%20dates%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2399841%22%20slang%3D%22en-US%22%3EHi%20Mathes%2C%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20you.%20I%20am%20interested%20in%20knowing%20how%20a%20formula%20would%20work%20for%20this.%20It%20would%20be%20better%20I%20think%20through%20VBA%20because%20of%20the%20start%20and%20end%20dates.%20The%20days%20should%20not%20really%20be%20a%20paid%20attention%20to%20because%20the%20formula%20refers%20to%20those%20days.%3CBR%20%2F%3E%3CBR%20%2F%3EEven%20with%20IFS%20formula%20I%20don%E2%80%99t%20filly%20understand%20how%20that%20would%20be%20able%20to%20repeat%20from%20the%20start%20date%20to%20the%20end%20date.%3CBR%20%2F%3E%3CBR%20%2F%3ETo%20me%20this%20seems%20a%20VBA%20loop%20type%20of%20solution%20would%20be%20needed.%20But%20again%20I%E2%80%99m%20not%20a%20programmer.%3CBR%20%2F%3E%3CBR%20%2F%3ELet%20me%20know%20if%20you%20have%20any%20other%20suggestions.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2399843%22%20slang%3D%22en-US%22%3ERe%3A%20Repeat%20for%20Annually%2C%20Quarterly%20between%202%20dates%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2399843%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1029845%22%20target%3D%22_blank%22%3E%40Tony2021%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20wrote%3A%20%22The%20days%20should%20not%20really%20be%20a%20paid%20attention%20to%20because%20the%20formula%20refers%20to%20those%20days.%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%3F!%3F!%26nbsp%3B%20That%20is%20a%20nonsensical%20statement.%20Since%20the%20formula%20refers%20to%20them%2C%20they%20HAVE%20to%20be%20paid%20attention%20to.%20So%20what%20is%20their%20function%20in%20the%20formula%3F%20Said%20another%20way%2C%20what%20is%20the%20connection%20between%2090%20and%20%22Annual%22%20or%2060%20and%20Quarterly%3F%20If%20anything%2C%2090%20is%20far%20closer%20to%20the%20number%20of%20days%20in%20a%20quarter%20of%20a%20year.%20Hence%20the%20confusion.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20please%20explain%20what%20the%2090%20and%2060%20are%20doing%2C%20why%20they're%20important.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnd%20believe%20me%2C%20a%20formula%20is%20far%20and%20away%20the%20better%20solution.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhile%20we're%20at%20it%2C%20if%20you%20really%20need%20a%20workday%20to%20be%20the%20answer%20in%20each%20case%2C%20that's%20fine.%20If%20I%20may%2C%20though%2C%20I'd%20like%20to%26nbsp%3B%20ask%20%22Why%3F%22%26nbsp%3B%20Is%20this%20for%20a%20highly%20legal%20financial%20matter%20and%20not%20just%20a%20personal%20reminder%3F%20If%20the%20latter%2C%20I%20should%20think%20that%20a%20far%20simpler%20formula%20would%20work%2C%20just%20adding%20365.25%20or%20365.25%2F4%20to%20each%20date%26nbsp%3B%20between%20the%20start%20and%20end%20dates.%20If%20you%20really%20need%20it%20to%20be%20a%20workday%2C%20as%20I%20said%2C%20that's%20fine.%20That%20does%20make%20it%20more%20complicated.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2399863%22%20slang%3D%22en-US%22%3ERe%3A%20Repeat%20for%20Annually%2C%20Quarterly%20between%202%20dates%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2399863%22%20slang%3D%22en-US%22%3EMathes%2C%3CBR%20%2F%3E%3CBR%20%2F%3EThe%2090%20and%2060%20are%20the%20days%20after%20the%20annual%20or%20wtr%20and%20are%20referenced%20in%20the%20formula.%20I%20said%20the%20days%20are%20not%20important%20because%20the%20solution%20should%20refer%20to%20the%20formula%20(not%20the%20days).%20Yes%2C%20workweek%20is%20necessary.%20I%20am%20not%20looking%20to%20change%20the%20formula.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2399900%22%20slang%3D%22en-US%22%3ERe%3A%20Repeat%20for%20Annually%2C%20Quarterly%20between%202%20dates%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2399900%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1029845%22%20target%3D%22_blank%22%3E%40Tony2021%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETry%20these%20solutions.%20I%20made%20a%20minor%20change%20to%20the%20layout%2C%20so%20that%20the%20start%20date%20appears%20above%20the%20column%20of%20scheduled%20annual%20payments.%20That%20way%2C%20each%20row%20going%20down%20refers%20to%20the%20date%20above%20in%20determining%20the%20next%20value.%20If%20the%20date%20that%20results%20from%20the%20formula%20is%20greater%20than%20the%20end%20date%2C%20then%20a%20blank%20is%20entered%20in%20the%20cell.%20This%20formula%20makes%20use%20of%20the%20LET%20function%2C%20and%20I'll%20explain%20it%20below.%20You%20will%20need%20the%20most%20recent%20version%20of%20Excel%20in%20order%20for%20this%20to%20work.%20Here's%20the%20formula%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3DLET(Intv%2C%3C%2FSTRONG%3E%3C%2FP%3E%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSTRONG%3E90%2C%3C%2FSTRONG%3E%3C%2FP%3E%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%3CSTRONG%3EDueDay%3C%2FSTRONG%3E%3C%2FP%3E%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%3CSTRONG%3E%2CWORKDAY(EOMONTH(J4%2CMOD(12-MONTH(J4)%2C12))%20%2BIntv-1%2C1%2CHolidaysUS)%2C%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EIF(DueDay%26gt%3B%24E%241%2C%22%22%2CDueDay))%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20%3CSTRONG%3ELET%3C%2FSTRONG%3E%20function%20first%20defines%20two%20things%3A%3C%2FP%3E%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%3CSTRONG%3EIntv%3C%2FSTRONG%3E%20which%20in%20the%20case%20of%20the%20annual%20schedule%20is%20the%20mysterious%20number%2090%20that%20you%20were%20unwilling%20to%20explain%3C%2FP%3E%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%3CSTRONG%3EDueDay%3C%2FSTRONG%3E%2C%20%3CEM%3E%3CU%3Ewhich%20is%20%3CSTRONG%3Eyour%3C%2FSTRONG%3E%20formula%3C%2FU%3E%3C%2FEM%3E%20modified%20ever%20so%20slightly%20to%20calculate%20the%20next%20payment%20date%20on%20an%20annual%20schedule%3C%2FP%3E%3CP%3EAfter%20which%20there%20is%20an%20%3CSTRONG%3EIF%3C%2FSTRONG%3E%20function%20that%20simply%20says%3C%2FP%3E%3CP%20class%3D%22lia-indent-padding-left-30px%22%3EIF%20DueDay%20is%20greater%20than%20the%20end%20date%2C%20display%20%22%22%2C%20a%20blank%2C%20otherwise%20display%20DueDay%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWith%20Start%20date%20in%20Cell%20J4%2C%20this%20formula%20filled%20in%20in%20J5%20and%20copied%20down%2C%20gives%20the%20annual%20due%20dates%20until%20starting%20to%20display%20blanks%20when%20the%20date%20exceeds%20the%20end%20date.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EA%20similar%20formula%2C%20modified%20slightly%20for%20the%20quarterly%20schedule%20is%20in%20Column%20P%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%20for%20some%20personal%20feedback%3A%20You're%20not%20an%20easy%20person%20to%20help.%3C%2FP%3E%3CUL%3E%3CLI%3EYou%20were%20unable%20to%20make%20a%20formula%20that%20worked%20and%20came%20asking%20for%20help.%20So%20by%20definition%20the%20formula%20had%20to%20change.%20Right%3F!%3C%2FLI%3E%3CLI%3EThe%20formula%20refers%20to%2060%20or%2090%20and%20you're%20unwilling%20to%20explain%20what%20those%20numbers%20do.%20And%20yet%20you%20were%20the%20one%20asking%20for%20help!%3C%2FLI%3E%3C%2FUL%3E%3CP%3EI'm%20of%20the%20opinion%20that%20if%20someone%2C%20in%20an%20effort%20to%20help%20you%2C%20asks%20you%20a%20reasonable%20question%20that%20you%20really%20should%20answer%20it%20rather%20than%20blowing%20it%20off.%20I%20hope%20these%20solutions%20work%20for%20you.%20I%20enjoy%20solving%20problems%20like%20this%20because%20I%20learn%20in%20the%20process.%20I%20even%20like%20explaining%20how%20these%20functions%20work.%20It's%20even%20more%20satisfying%20when%20it's%20a%20cooperative%20effort.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2401818%22%20slang%3D%22en-US%22%3ERe%3A%20Repeat%20for%20Annually%2C%20Quarterly%20between%202%20dates%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2401818%22%20slang%3D%22en-US%22%3E%3CP%3E%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%3BInteresting.%20I%20have%20never%20heard%20of%20LET.%20Could%20it%20somehow%20be%20adjusted%20to%20add%20functionality%20to%20simply%20drag%20the%20formula%20down%20for%20the%20entire%20dataset%3F%20What%20I%20mean%20is%20lets%20imagine%20there%20are%2010%2C000%20records%20with%20annually%20and%20quarterly%20spread%20throughout%20(which%20is%20the%20case%20but%20the%20example%20I%20provided%20was%20only%20a%20few%20records).%20Ideally%2C%20I%20would%20like%20to%20be%20able%20to%20drag%20the%20LET%20formula%20down%2010000%20rows%20and%20use%20the%20appropriate%20formula%20if%20the%20row%20is%20either%20%22annually%22%20or%20%22quarterly%22%20then%20use%20the%20corresponding%20formula%20(D4%20or%20D5)%20but%20also%20being%20mindful%20of%20the%20End%20Date.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%2C%20the%2090%20and%2060%20can%20be%20removed%20from%20the%20LET%20formula%20since%20I%20would%20refer%20to%20a%20cell%20instead%20of%20hardcoding%2C%20which%20would%20add%20more%20functionality.%26nbsp%3B%20Sorry%20it%20was%20confusing.%26nbsp%3B%20Kindly%20let%20me%20know%20if%20it%20is%20more%20clear%20now.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20file%20I%20attached%20includes%20a%20simply%20modification%20(the%2090%20or%2060%20hardcode%20is%20removed%20from%20the%20LET%20formula%20and%20now%20refers%20to%20a%20cell%20in%20the%20row)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethank%20you%20for%20the%20help.%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%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2401912%22%20slang%3D%22en-US%22%3ERe%3A%20Repeat%20for%20Annually%2C%20Quarterly%20between%202%20dates%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2401912%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1029845%22%20target%3D%22_blank%22%3E%40Tony2021%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20will%20have%20to%20look%20at%20this%20later.%20In%20the%20meantime%2C%20I%20really%20would%20appreciate%20it%20if%20you'd%20tell%20me%20what%20the%2090%20and%2060%20DO%20in%20the%20formula%2C%20why%20they're%20necessary%2C%20what%20function%20they%20perform%3F%20Etc.%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFWIW%2C%20I%20agree%20we%20should%20avoid%20hard-coding.%20You%20kind%20of%20made%20that%20necessary%20(if%20I%20may%20say%20so)%20by%20not%20explaining%20them.%20I'm%20not%20a%20financial%20person%2C%20although%20I%20do%20a%20lot%20with%20investing%20and%20have%20a%20pretty%20elaborate%20spreadsheet%20to%20track%20my%20options%20positions.%20What%20you%20have%20here%20appears%20to%20be%20somehow%20related%20to%20accounts%20with%20some%20kind%20of%20payment%20schedules......%20I%20just%20like%20to%20understand%20WHAT%20the%20variables%20are%2C%20what%20they%20represent%2C%20if%20I'm%20to%20be%20writing%20a%20formula%20that%20involves%20them%2C%20whether%20or%20not%20they're%20hard-coded.%20What%20do%20they%20mean%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20to%20whether%20a%20single%20formula%20can%20be%20developed%20and%20copied%20down%2010%2C000%20rows%2C%20it%20surely%20depends%20in%20part%20on%20a%20number%20of%20questions.%20So%20let%20me%20ask%3A%3C%2FP%3E%3CUL%3E%3CLI%3EWIll%20the%20start%20and%20end%20date%20be%20the%20same%20for%20every%20one%20of%20these%20rows%3F%3C%2FLI%3E%3CLI%3EAre%20the%2010%2C000%20rows%20representing%2010%2C000%20accounts%2C%20or%20100%20accounts%20with%20100%20payments%20each%3F%20Something%20in-between%3F%3C%2FLI%3E%3CLI%3EWhy%20all%20on%20one%20huge%20sheet%3F%20Many%20people%20find%20it%20more%20useful%20to%20have%20a%20Dashboard%20that%20can%20show%20just%20the%20accounts%20for%20one%20person%20at%20a%20time%2C%20or%20something%20along%20those%20lines.%3C%2FLI%3E%3CLI%3EIn%20essence%2C%20what%20all%20these%20are%20getting%20at%3A%20you%20seem%20to%20want%20to%20disclose%20a%20minimum%20amount%20of%20information%2C%20and%20maybe%20there%20are%20proprietary%20reasons%20for%20that%2C%20but%20it%20would%20really%20help--if%20we%20were%20doing%20this%20face%20to%20face%20it'd%20be%20easier--to%20know%20what%20the%20overall%20business%20is%2C%20what%20your%20overall%20data%20structure%20is.%20What%20the%20INPUT%20is%3B%20what%20the%20OUTPUT%20is.%20Where%20these%2010%2C000%20rows%20with%20one%20or%20two%20formulas%20fit%20into%20that%20overall%20structure.%3C%2FLI%3E%3C%2FUL%3E%3CP%3EThe%20LET%20function%20is%20really%20a%20great%20addition%20to%20the%20repertoire%20of%20a%20spreadsheet%20creator.%20It%20was%20new%20last%20year.%20I've%20only%20had%20a%20couple%20occasions%20to%20use%20it.%20The%20one%20I%20created%20for%20you%20could%20be%20even%20more%20elegant%2C%20I'm%20sure.%20As%20I%20have%20been%20saying%2C%20though%2C%20it%20would%20be%20easier%20to%20do%20so%20if%20I%20had%20a%20better%2Fclearer%20picture%20of%20the%20whole%20process%20into%20which%20this%20is%20fitting.%3C%2FP%3E%3CP%3EAgain%2C%20too%2C%20here's%20a%20link%20to%20a%20good%20website%20where%20you%20could%20study%20up%20on%20LET%3A%20%3CA%20href%3D%22https%3A%2F%2Fexceljet.net%2Fexcel-functions%2Fexcel-let-function%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fexceljet.net%2Fexcel-functions%2Fexcel-let-function%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnd%20I'm%20sure%20there%20are%20YouTube%20videos%20on%20the%20subject%20as%20well.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

Hello experts,

 

I am not sure if I will get a response here but thought I would ask anyways to check if an expert has a suggestion/solution.

 

I have a file with due dates based on if the frequency is either annually or quarterly.  

If annual, use one formula (cell D4)

If quarterly, use another. (cell D5)

 

I want to repeat t for the number of "hits" for annually and quarterly between the Start Date and End Date.  I need the result to be in 1 column. 

 

I assume a solution would be in VBA code (some kind of loop..Im not a programmer).  Kindly see the attached file with sample data.   After viewing, I think you will be able to see more clearly what I am trying to do.   Sorry for any confusion but its better to look at the file to understand completely.  The difficult part to me is repeating only between the start date and end date.  

 

Grateful for your assistance

 

 

16 Replies

@Tony2021 

This can definitely be done via formula; no need for VBA.

 

However, it's not clear to me--your formulas make no reference to them--what the numbers 90 and 60 have to do with anything in here. If you can clear that up....

 

The other observation, though: you clearly--from the formula you HAVE written--are quite conversant with Excel and Excel functions. I wonder why you haven't tried just a little bit harder to write your own solution; it's much more satisfying.

 

I would point you in two directions, directions I'd go in to resolve your situation. One is the IFS function, whereby you could write a single formula that would give you your results whether annual OR quarterly. https://exceljet.net/excel-functions/excel-ifs-function

 

The other, more recently released (and needing the newest version of Excel), and more powerful, is the LET function. It can help make a formula more efficient where there are repetitions of major portions of a formula. https://exceljet.net/excel-functions/excel-let-function

 

Hi Mathes,

Thank you. I am interested in knowing how a formula would work for this. It would be better I think through VBA because of the start and end dates. The days should not really be a paid attention to because the formula refers to those days.

Even with IFS formula I don’t filly understand how that would be able to repeat from the start date to the end date.

To me this seems a VBA loop type of solution would be needed. But again I’m not a programmer.

Let me know if you have any other suggestions.

@Tony2021 

 

You wrote: "The days should not really be a paid attention to because the formula refers to those days."

 

What?!?!  That is a nonsensical statement. Since the formula refers to them, they HAVE to be paid attention to. So what is their function in the formula? Said another way, what is the connection between 90 and "Annual" or 60 and Quarterly? If anything, 90 is far closer to the number of days in a quarter of a year. Hence the confusion.

 

So please explain what the 90 and 60 are doing, why they're important.

 

And believe me, a formula is far and away the better solution.

 

While we're at it, if you really need a workday to be the answer in each case, that's fine. If I may, though, I'd like to  ask "Why?"  Is this for a highly legal financial matter and not just a personal reminder? If the latter, I should think that a far simpler formula would work, just adding 365.25 or 365.25/4 to each date  between the start and end dates. If you really need it to be a workday, as I said, that's fine. That does make it more complicated.

Mathes,

The 90 and 60 are the days after the annual or wtr and are referenced in the formula. I said the days are not important because the solution should refer to the formula (not the days). Yes, workweek is necessary. I am not looking to change the formula.

@Tony2021 

 

Try these solutions. I made a minor change to the layout, so that the start date appears above the column of scheduled annual payments. That way, each row going down refers to the date above in determining the next value. If the date that results from the formula is greater than the end date, then a blank is entered in the cell. This formula makes use of the LET function, and I'll explain it below. You will need the most recent version of Excel in order for this to work. Here's the formula

=LET(Intv,

90,

DueDay

,WORKDAY(EOMONTH(J4,MOD(12-MONTH(J4),12)) +Intv-1,1,HolidaysUS),

IF(DueDay>$E$1,"",DueDay))

 

The LET function first defines two things:

Intv which in the case of the annual schedule is the mysterious number 90 that you were unwilling to explain

DueDay, which is your formula modified ever so slightly to calculate the next payment date on an annual schedule

After which there is an IF function that simply says

IF DueDay is greater than the end date, display "", a blank, otherwise display DueDay

 

With Start date in Cell J4, this formula filled in in J5 and copied down, gives the annual due dates until starting to display blanks when the date exceeds the end date.

 

A similar formula, modified slightly for the quarterly schedule is in Column P

 

Now for some personal feedback: You're not an easy person to help.

  • You were unable to make a formula that worked and came asking for help. So by definition the formula had to change. Right?!
  • The formula refers to 60 or 90 and you're unwilling to explain what those numbers do. And yet you were the one asking for help!

I'm of the opinion that if someone, in an effort to help you, asks you a reasonable question that you really should answer it rather than blowing it off. I hope these solutions work for you. I enjoy solving problems like this because I learn in the process. I even like explaining how these functions work. It's even more satisfying when it's a cooperative effort.

@mathetes Interesting. I have never heard of LET. Could it somehow be adjusted to add functionality to simply drag the formula down for the entire dataset? What I mean is lets imagine there are 10,000 records with annually and quarterly spread throughout (which is the case but the example I provided was only a few records). Ideally, I would like to be able to drag the LET formula down 10000 rows and use the appropriate formula if the row is either "annually" or "quarterly" then use the corresponding formula (D4 or D5) but also being mindful of the End Date. 

 

Also, the 90 and 60 can be removed from the LET formula since I would refer to a cell instead of hardcoding, which would add more functionality.  Sorry it was confusing.  Kindly let me know if it is more clear now.  

 

The file I attached includes a simply modification (the 90 or 60 hardcode is removed from the LET formula and now refers to a cell in the row)

 

thank you for the help. 

 

 

 

@Tony2021 

 

I will have to look at this later. In the meantime, I really would appreciate it if you'd tell me what the 90 and 60 DO in the formula, why they're necessary, what function they perform? Etc.,

 

FWIW, I agree we should avoid hard-coding. You kind of made that necessary (if I may say so) by not explaining them. I'm not a financial person, although I do a lot with investing and have a pretty elaborate spreadsheet to track my options positions. What you have here appears to be somehow related to accounts with some kind of payment schedules...... I just like to understand WHAT the variables are, what they represent, if I'm to be writing a formula that involves them, whether or not they're hard-coded. What do they mean?

 

As to whether a single formula can be developed and copied down 10,000 rows, it surely depends in part on a number of questions. So let me ask:

  • WIll the start and end date be the same for every one of these rows?
  • Are the 10,000 rows representing 10,000 accounts, or 100 accounts with 100 payments each? Something in-between?
  • Why all on one huge sheet? Many people find it more useful to have a Dashboard that can show just the accounts for one person at a time, or something along those lines.
  • In essence, what all these are getting at: you seem to want to disclose a minimum amount of information, and maybe there are proprietary reasons for that, but it would really help--if we were doing this face to face it'd be easier--to know what the overall business is, what your overall data structure is. What the INPUT is; what the OUTPUT is. Where these 10,000 rows with one or two formulas fit into that overall structure.

The LET function is really a great addition to the repertoire of a spreadsheet creator. It was new last year. I've only had a couple occasions to use it. The one I created for you could be even more elegant, I'm sure. As I have been saying, though, it would be easier to do so if I had a better/clearer picture of the whole process into which this is fitting.

Again, too, here's a link to a good website where you could study up on LET: https://exceljet.net/excel-functions/excel-let-function

 

And I'm sure there are YouTube videos on the subject as well.

 

Mathes, the 90 and the 60 are the days after annually or quarterly.

To answer your queries:
WIll the start and end date be the same for every one of these rows?
==>answer: Yes
Are the 10,000 rows representing 10,000 accounts, or 100 accounts with 100 payments each? Something in-between?
==>Answer: the later....100 accounts w 100 payments each. Its not payments though but could be seen as such.

Why all on one huge sheet? Many people find it more useful to have a Dashboard that can show just the accounts for one person at a time, or something along those lines.
==>Answer: they all have to be on one sheet. I do have source sheets but still the annually and quarterly are mixed and wouldnt be easy to separate. Besides there are more cases and not only annually and quarterly. I have made it simple.

In essence, what all these are getting at: you seem to want to disclose a minimum amount of information, and maybe there are proprietary reasons for that, but it would really help--if we were doing this face to face it'd be easier--to know what the overall business is, what your overall data structure is. What the INPUT is; what the OUTPUT is. Where these 10,000 rows with one or two formulas fit into that overall structure.
==>Answer: Its not a payment schedule. Its a compliance report when certain deliverables are due (annually, quarterly...). I plan to adapt your solution to my real dataset and modify as needed.

Let me know if you have any other questions.

@Tony2021 

 

OK, Tony. I definitely have more questions. And, frankly, the more I think through this, the more it does appear as if a VBA routine may be needed. The fundamental problem in what you've described is that of borders or boundaries...how to recognize when one account (or whatever it is) ends and the next begins. It would be easy to recognize that a new quarterly or annual (or semi-annual or monthly) set of due dates is to begin. But because the number of rows will vary for each of those conditions, you need to have a way to provide exactly the number of rows that will be needed between start and end dates, and that would be a huge task NOT accomplished by just copying a single formula down 10,000 rows. 

 

To illustrate: in the example you've given you have a total of 20 rows, four for the annual due dates, 16 for the quarterly. So it would be easy to have a formula that deals with that already structured data set.

 

Are your 10,000 rows similarly set up, so that those that are annual for four years already have four spots, just needing the dates; those that are quarterly already have 16? If so, that's great, and we can write the formula. But if that structure---i.e., the setting aside of the requisite number of rows per _____________(account, client, security, option)--- is part of the task, then you do need a macro.

 

I have a formula in mind if the structure exists, but I am not going to write it out until I get confirmation that it will work. Maybe you could extend the example data to be more reflective of the true nature of what you're working with. Not all 10,000 rows, but maybe 6-10 different schedules (annual, quarterly, monthly) randomly assorted, if that's indeed how they appear.

 

And could I ask once again: You've said twice something to the effect "the 90 and the 60 are the days after annually or quarterly" but that doesn't tell me anything about why they're in the formula, what their significance is. It doesn't lead to understanding why we're dealing with them in the formulas. Is the actual due date 90 or 60 days earlier than the date the formula produces? Why is it 90 for annual and 60 for quarterly? What's the relationship? It's obviously clear to you; but you've not explained a thing of the Why? -- i.e., their PURPOSE in all of this. It may be so obvious to you that you don't understand why I don't understand..... I'm an intelligent person and I'm asking for a more comprehensive explanation to a novice in your field. I do understand Puts and Calls and can teach those derivatives concepts....so I doubt these are beyond my ability to grasp. Thanks.

 

 

@mathetes 

Hi Mathes, thank you for your reply. Seems we are making some progress.
I will answer your questions below:

 

Your Question: 
<Are your 10,000 rows similarly set up, so that those that are annual for four years already have four spots, just needing the dates; those that are quarterly already have 16?
==>Answer: Unfortunately, that is not the case. I use to have the ‘spots’ set up without the dates but I am doing another project and it was very tedious work to set up those spots.
Also, just FYI, the data set is not actually 10,000 rows. I was only making a point. Its more like 1000.

 

Your Question:
< is the actual due date 90 or 60 days earlier than the date the formula produces? Why is it 90 for annual and 60 for quarterly? What's the relationship? It's obviously clear to you; but you've not explained a thing of the Why? -- i.e., their PURPOSE in all of this.
==>Answer: for example, I need to produce a document 90 days after fiscal year end or 60 days. The days are simply the count. Sometimes its prior to FYE too. The 90 or 60 or whatever it might be, is hard coded inside the formula but it doesn’t have to be. I could reference a cell that displays the count (simply a cell with either 90, 60…) to make it more dynamic.

 

I think after viewing the additional sample data attached you might have a better understanding.

 

Let me know if you have any other questions. I appreciate your help.

 

@Tony2021 

 

Sigh....I think I'm as confused as ever. Maybe "perplexed" is a better word. If we were sitting down together, we'd be able to go far more quickly into some details that would be helpful. As it is, exchanging text postings, albeit some fairly long ones, we seem to be just scratching the surface.

 

If I were in your shoes, having whatever the responsibility is to produce these compliance reports, I would NOT want to be working with a list of even "only" 1,000 rows. I'd want to come up with a way--probably relatively easy, and maybe you're doing this--to highlight the reports due this month. I wouldn't want to have to go searching for them. I also see no real value in knowing today that on Tuesday, March 31, 2026 the reports of X companies are due, along with all the other due dates that are in the distant future.

 

I would seek, I think, to design a spreadsheet that shows me today:

  • the reports that are due (whatever: this month, this year).
  • Maybe also a summary of all reports by category (monthly, quarterly, annually; or accounting, construction, shipping...whatever the meaningful categories are) with frequency required and end dates....

 

Now, maybe you in fact are doing that. You're just asking here for help with a single (or several) formulas. But it's working with just a glimpse of the big picture that adds to confusion and frustration.

 

In any event, Tony, you clearly have a great deal of facility with formulas. I think this one in particular is a creative way to get at variability in whether a given report is monthly, quarterly or annual.

=WORKDAY(EDATE(E55,CHOOSE(MATCH(B56,{"annually","quarterly","semi-annually","monthly"},0),12,3,6,1))-1,1,Holidays_US_Jap)

I would suggest you could use the same idea via Named Ranges to store the values in a visible table somewhere in your workbook, such that values could be changed. Same for the 60/90/120/30/values for Timing, since those in particular could be changed, so having them in a table would obviate the need to hard code OR to put them in each row.

 

Let me share with you two** things that you might find useful, if not for this project, perhaps for something else calendar related. I've mentioned that I have a spreadsheet that I use for tracking options trades. Monthly Puts and Calls expire on the third Friday of each month. So here's a formula that will take any given year, any given month, and yield the exact date of the third Friday of that month. As you can see, it uses the LET function.

=LET(FstDa,DATE(L30,L31,1),

FstDa+CHOOSE(WEEKDAY(FstDa),19,18,17,16,15,14,20))

  • In that formula, L30 is a cell containing the year; L31 contains the month (both numeric values)
  • FstDa, then uses the DATE function to determine the first date of the month
  • The main formula then uses WEEKDAY to determine what day of the week that first day is
  • then CHOOSE to select various values depending on what day of the week that first day is
  • and then adds whatever value is "chosen" by CHOOSE to the first day of the month.
  • Recall, I use this as written just to determine the third Friday...now you can see that, if the first day of the month is a Friday, then the third would be found by adding two weeks, 14 days, to that first date. If, on the other hand, that first day of the month were to be a Thursday, then this formula adds 15. And so forth.

 

Whether or not something like that would be useful to you--since it enables the identification of given workdays in any month any year--is up to you to determine. I'm sure it could be made more powerful, more flexible, with a bit of tweaking (perhaps with MOD). I thought of it given (a) your need for a workday result, and (b) the need to project out due dates, falling on workdays, at specific intervals.   So I wonder if you could just have a database that shows:

  • each compliance report,
  • the date of the last report,
  • whether or not it's annual/quarterly/monthly,
  • and then add 12, 3, or 1 month to the date of the last report to yield the next date, the next Friday, one year out, three months out, one month out........

is it possible you could do away with the need for a 1,000 row (nearly unintelligible) table?

 

That's my question to you this time around. Is it possible for you to re-think how you approach this task?

 

**the second of two I'll post as a separate post. It's a spreadsheet that does some amazing things with dates.

@Tony2021 

 

Here's the second of two things for you to consider as ways to simplify your task of forecasting or planning the due dates for compliance reports.

 

The attached is a spreadsheet I got from some other source--I don't even recall where; it may have been here at techcommunity, although I don't think so. It's a table that can be used to lookup the Nth occurrence of any day of the week in any month of any year. Play around with it. It's potentially useful, in conjunction with the kind of reporting you have responsibility for. At the very least, it could be extended and used as the source of data for a VLOOKUP or XLOOKUP function.

Hi Mathetes,

Thank you for your insight into my project. Much appreciated.

To answer your questions:
<is it possible you could do away with the need for a 1,000 row (nearly unintelligible) table?
I have all the raw data in a sheet and I import it into access and I do filter for what is coming due.

To follow up on the formula
=LET(FstDa,DATE(L30,L31,1),
FstDa+CHOOSE(WEEKDAY(FstDa),19,18,17,16,15,14,20))
==>I am not sure how I could use it to be honest. I am not looking for the first, second, third MOn, Tues, Wed.... of the month. Its a date I am looking for that is the day count after or prior to the event that is due (ie Financials to be submitted 90 days past fiscal year end and the formula in the excel sheets I have sent also use the preceding (or following in some cases) business day if the day falls on a holiday.

The best solution to me is to have a formulas that would allow me to drag it down the 1000 or so rows. Or as you mentioned a VBA solution.

I am not sure if we can collaborate more on this or not but i am willing to.
thank you and looking forward to your comments. (note I do see your other comment below with the excel file attached)

@Tony2021 

 

You wrote: I have all the raw data in a sheet and I import it into access and I do filter for what is coming due.

 

This is the first mention of Access in all of our exchanges. Which underscores my earlier point that we just keep scratching the surface of this whole project. And that you import the raw data from Excel into Access!?! And then filter?

 

I am not sure if we can collaborate more on this or not but i am willing to.

 

I too am willing, but we can't just keep revealing small bits. I'm NOT a VBA/macro person. To the extent that might be what's required, I would not be the person to do it. To the extent that it's resolvable with functions, I'd be interested, but I would need to get a far more complete picture of where data is coming from (INPUT), how it comes into the picture, who's responsible for it; followed by OUTPUT--what really are the results needed? To just work on a formula, in the middle of what is clearly a major responsibility, a major business process flow with major consequences, isn't how to do it. It may be that in the end, all you need is a revised formula...or a VBA routine...but to just be shown the little part of it feels (to me, at any rate) like working blindfolded.

Hi Mathetes, sorry but I got very busy with my job. Maybe we can carve out some time to speak on the phone? I live in Houston, Texas. I assume I can send you a personal message possibly on this site with my phone no if agreeable.
I just sent you a personal message. You should see a notification up on the top right of your screen.