Forum Discussion
Repeat for Annually, Quarterly between 2 dates
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.
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)
- mathetesJun 02, 2021Silver ContributorI just sent you a personal message. You should see a notification up on the top right of your screen.
- Tony2021Jun 02, 2021Iron ContributorHi 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.
- mathetesJun 01, 2021Silver Contributor
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.