Forum Discussion
PGSS1312
Jun 07, 2024Copper Contributor
Return value if the day of the month is between 2 dates
Hello,
I have a cash flow summary (calculates out 4 to 6 weeks) and I need it to automatically enter values based on the day of the month and a week ending date.
For example:
- we need to prepare to pay the credit card balance on the 22nd of the month, it is auto deducted from the account and generally around the same amount every month.
- I need to the report to show the value if the 22nd falls between 2 dates at the top (the dates represent the week ending date.
I also have trouble with getting it to show anything due on the 1st of a month. We have several payments that are auto debited on the 1st of every month.
The rest of my report is all formulas and basically plug n' play from other sheets. This is the one formula I am having trouble with and can't seem to find a solution.
This is my formula but I think I am missing a part of it or something to get it to work. Or maybe I just need a different approach. I don't get anything in the cell.
D1 = 6/15/24, E1 = 6/22/24
=IF(DAY(D$1)>20,IF(DAY(E$1)<=25,20000,0),0)
I have tried (IF(AND.... but that seems to require a date which changes every month. Maybe I need a multi-step formula or approach to this?
I need to hand this off to someone who doesn't know excel very well so I want it to be as simple as possible so I can lock sheets and formulas and they can just plug in the reports I show them.
Thank you to anyone who can assist!
Would this work?
=(DAY(D$1)=MEDIAN(DAY(D$1),20,25))*20000
Small example attached, but changed it to make it dynamic, where the amount, the minimum and maximum day values are replaced by cell references.
- Riny_van_EekelenPlatinum Contributor
Would this work?
=(DAY(D$1)=MEDIAN(DAY(D$1),20,25))*20000
Small example attached, but changed it to make it dynamic, where the amount, the minimum and maximum day values are replaced by cell references.
- PGSS1312Copper Contributor
Riny_van_Eekelen Sorry for the delay in replying. Thank you so much! It worked for what I was trying to do.