Forum Discussion
Fill Cells Based on Date & Num of Days
- Dec 31, 2023
If you want a dynamic array formula, it should be
=IF((N$9:R$9>$H11-$G11)*(N$9:R$9<=$H11), "X", "")
(AND returns a single TRUE/FALSE value, not an array).
All this assumes that N9:R9 contains dates (formatted as d-mmm), and that H11 and down contain dates too (formatted as m/d).
ForgedinFire5100 My previous reply contained a typo. I have corrected it; does it work now?
- HansVogelaarJan 01, 2024MVP
Could you attach a small sample workbook demonstrating the problem (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar?
- ForgedinFire5100Jan 01, 2024Copper ContributorI have messaged you a link to sample workbook.
Thanks.- HansVogelaarJan 01, 2024MVP
Thank you! The problem is that P7 and hence N9:T9 contain dates in 2024, but H11, H12 and H13 contain dates in 2023. If you change the latter to dates in 2024, the formula will work as intended.