I need a formula to find the date that is closest to a baseline date across each month.
In the attached spreadsheet, Column A contains the real data. Column E shows a simplified version of Column A, using SORT(UNIQUE) to provide a condensed view. Column F is where I need the formula to output the closest matching date. The baseline date is set in cell L1 and should be used as the reference for comparison. The formula should evaluate all dates across every month and determine which date most closely matches the baseline date for each month.
My attempt at it has been less than successful. I've used:
=ABS(G2 - EDATE($N$1, -1)) = MIN(ABS($G$2:$G$100 - EDATE($N$1, -1)))
=AND(G2 >= EDATE($N$1, -1) - 7, G2 <= EDATE($N$1, -1) + 7)
And the cells seen above are from my actual spreadsheet, not this example attachment.
Bookmarks