+ Reply to Thread
Results 1 to 6 of 6

Formula to find trending date

  1. #1
    Forum Contributor
    Join Date
    07-06-2021
    Location
    USA
    MS-Off Ver
    365
    Posts
    261

    Formula to find trending date

    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.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,172

    Re: Formula to find trending date

    Try this:

    =E1=IF(E1<$L$1,MAXIFS($E$1#,$E$1#,"<="&EOMONTH(E1,0)),MINIFS($E$1#,$E$1#,">"&EOMONTH(E1,-1)))

  3. #3
    Forum Contributor
    Join Date
    07-06-2021
    Location
    USA
    MS-Off Ver
    365
    Posts
    261

    Re: Formula to find trending date

    Attachment 876883

    Not quite there.

  4. #4
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Formula to find trending date

    With K2 +/- days from baseline date, =IF(ABS(DAY(E1)-DAY($K$1))<$K$2,TRUE,FALSE)
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    07-06-2021
    Location
    USA
    MS-Off Ver
    365
    Posts
    261

    Re: Formula to find trending date

    Genius, thank you so much!

  6. #6
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Formula to find trending date

    You are welcome and thanks for the Rep!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Trending formula with Some Additional Formatting Changes
    By green4000 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-08-2018, 04:07 PM
  2. Formula for budget trending
    By heathers3245 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-19-2018, 07:59 PM
  3. Formula for budget trending
    By heathers3245 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-19-2018, 07:29 PM
  4. Replies: 2
    Last Post: 12-10-2013, 02:30 AM
  5. Trending formula and indicators
    By Raging in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-22-2013, 10:02 AM
  6. [SOLVED] Trending Formula Results by Date
    By sony654 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-01-2006, 10:40 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1