T
Talka
Let's say I have a number of recurring tasks. These tasks occur eithe
monthly, quarterly or yearly. Each task is due either several day
_after_the_start_ of each month/quarter/year, or several day
_before_the_end_ of each month/quarter/year. This means there are si
types of recurring tasks:
- Due X workdays after start of month
- Due X workdays before end of month
- Due X workdays after start of quarter
- Due X workdays before end of quarter
- Due X workdays after start of year
- Due X workdays before end of year
For each of these six types, I want to feed Excel the X variable abov
(e.g., "Due *-_3_-* workdays after start of month"), as well as a date
I then want Excel to tell me the next time the recurring task is du
after the date provided. For example, if I feed Excel X=3 an
date=2012.11.28, Excel should tell me:
- Next time "Due 3 workdays after start of month" occurs: 2012.12.05
- Next time "Due 3 workdays before end of month" occurs: 2012.11.28
- Next time "Due 3 workdays after start of quarter" occurs
2013.01.03
- Next time "Due 3 workdays before end of quarter" occurs: 2012.12.26
- Next time "Due 3 workdays after start of year" occurs: 2013.01.03
- Next time "Due 3 workdays before end of year" occurs: 2012.12.26
I've spent a few hours messing around with the WORKDAY(), EOMONTH()
DATE(), FLOOR() and CEILING() functions. Nothing I try works
Particularly difficult are dates near the calendar cutoffs (e.g.
2012.12.31). Find below my flawed attempts. In these formulas, cell A
is the number of workdays (i.e., "X") and cell A2 is the date.
- Next time "Due X workdays after start of month" occurs
=WORKDAY(EOMONTH(A2,-1),A1)
- Next time "Due X workdays before end of month" occurs
=WORKDAY(EOMONTH(A2,0)+1,-A1)
- Next time "Due X workdays after start of quarter" occurs
=WORKDAY(DATE(YEAR(A2),FLOOR(MONTH(A2)-1,3)+1,1)-1,A1)
- Next time "Due X workdays before end of quarter" occurs
=WORKDAY(DATE(YEAR(A2),CEILING(MONTH(A2),3)+1,0)+1,-A1)
- Next time "Due X workdays after start of year" occurs
=WORKDAY(DATE(YEAR(A2),12,31),A1)
- Next time "Due X workdays before end of year" occurs
=WORKDAY(DATE(YEAR(A2),12,31)+1,-A1)
None of these are correct in their current formats.
Does anyone know a better way of approaching this? Or does anyone wan
to try their luck at correcting my formulas
monthly, quarterly or yearly. Each task is due either several day
_after_the_start_ of each month/quarter/year, or several day
_before_the_end_ of each month/quarter/year. This means there are si
types of recurring tasks:
- Due X workdays after start of month
- Due X workdays before end of month
- Due X workdays after start of quarter
- Due X workdays before end of quarter
- Due X workdays after start of year
- Due X workdays before end of year
For each of these six types, I want to feed Excel the X variable abov
(e.g., "Due *-_3_-* workdays after start of month"), as well as a date
I then want Excel to tell me the next time the recurring task is du
after the date provided. For example, if I feed Excel X=3 an
date=2012.11.28, Excel should tell me:
- Next time "Due 3 workdays after start of month" occurs: 2012.12.05
- Next time "Due 3 workdays before end of month" occurs: 2012.11.28
- Next time "Due 3 workdays after start of quarter" occurs
2013.01.03
- Next time "Due 3 workdays before end of quarter" occurs: 2012.12.26
- Next time "Due 3 workdays after start of year" occurs: 2013.01.03
- Next time "Due 3 workdays before end of year" occurs: 2012.12.26
I've spent a few hours messing around with the WORKDAY(), EOMONTH()
DATE(), FLOOR() and CEILING() functions. Nothing I try works
Particularly difficult are dates near the calendar cutoffs (e.g.
2012.12.31). Find below my flawed attempts. In these formulas, cell A
is the number of workdays (i.e., "X") and cell A2 is the date.
- Next time "Due X workdays after start of month" occurs
=WORKDAY(EOMONTH(A2,-1),A1)
- Next time "Due X workdays before end of month" occurs
=WORKDAY(EOMONTH(A2,0)+1,-A1)
- Next time "Due X workdays after start of quarter" occurs
=WORKDAY(DATE(YEAR(A2),FLOOR(MONTH(A2)-1,3)+1,1)-1,A1)
- Next time "Due X workdays before end of quarter" occurs
=WORKDAY(DATE(YEAR(A2),CEILING(MONTH(A2),3)+1,0)+1,-A1)
- Next time "Due X workdays after start of year" occurs
=WORKDAY(DATE(YEAR(A2),12,31),A1)
- Next time "Due X workdays before end of year" occurs
=WORKDAY(DATE(YEAR(A2),12,31)+1,-A1)
None of these are correct in their current formats.
Does anyone know a better way of approaching this? Or does anyone wan
to try their luck at correcting my formulas