Forum Discussion
LisaMarie1981
Dec 13, 2023Brass Contributor
Formula to Set the date based on another cell date
Hi there, I need a formula to set the date to either the 10th or 25th based on when another date falls. Anything from the 10th of any given month to the 24th in column A would have the date in colu...
- Dec 13, 2023
=IF(AND(DAY(A1)>=10,DAY(A1)<=24),
DATE(YEAR(A1),MONTH(A1),25),
IF(DAY(A1)<=10,
DATE(YEAR(A1),MONTH(A1),10),
DATE(YEAR(A1),MONTH(A1)+1,10)))
Does this return the intended output?
OliverScheurich
Dec 13, 2023Gold Contributor
=IF(AND(DAY(A1)>=10,DAY(A1)<=24),
DATE(YEAR(A1),MONTH(A1),25),
IF(DAY(A1)<=10,
DATE(YEAR(A1),MONTH(A1),10),
DATE(YEAR(A1),MONTH(A1)+1,10)))
Does this return the intended output?
- LisaMarie1981Dec 18, 2023Brass Contributorit worked in the cell I put the formula in, but when I try to drag the formula down it doesn't work?
- OliverScheurichDec 18, 2023Gold Contributor
I don't understand. Can you check if the intended result is returned in the attached file? It's the result shown in the screenshot of my first reply.
- LisaMarie1981Dec 18, 2023Brass ContributorSorry, please disregard, the date was wrong in the 2nd row so it didn't calculate, the formula worked fine once I fixed that. Thank you so much Oliver!!! 🙂