Check if a moratorium date falls on the range between Start Date and End Date
I have a list of moratorium dates. I want to confirm if the Start to End Date for each task range falls on a moratorium date. I used this formula and it's unparseable.
=COUNTIF([Moratorium Date]:[Moratorium Date], >=[Start Date]@row) AND COUNTIF([Moratorium Date]:[Moratorium Date], <=[End Date]@row)
When I test the first COUNTIF function it works, but doesn't seem to work if I add the AND second argument.
Answers
-
@Baltimorejones You can use the IF and AND functions together to check if the dates fall within a specified range. Please try the formula below:
=IF(AND([Moratorium Date]@row >= [Start Date]@row, [Moratorium Date]@row <= [End Date]@row), "Yes", "No")
Please let me know if you need any assistance!Joseph Aloysias| Solutions Lead
vSaaS Global
Book a Meeting
Phone: +91-8148459084 -
Hi @Joseph Aloysias - vSaaS Global This is really helpful; thanks! The moratorium date field is a column that links to a separate sheet that lists all of the moratorium dates. Therefore I want to check the Start and End Date range of a row against the entire column of Moratorium dates. How can I expand this to check the start and end date range of a row against the entire column of moratorium dates?
Example: Start Date is 6/23 and end date is 6/27.
Moratorium dates for june include: 6/1, 6/2, 6/3, etc.
-
Try a COUNTIFS
=COUNTIFS([Moratorium Date]:[Moratorium Date], >=[Start Date]@row, [Moratorium Date]:[Moratorium Date], <=[End Date]@row)
If the Moratorium Dates are in a separate sheet, you will need to use a {Cross Sheet Reference}.
.
Help Article Resources
Categories
Check out the Formula Handbook template!