+ Reply to Thread
Results 1 to 7 of 7

The closest date to today...with a twist!

  1. #1
    Registered User
    Join Date
    12-03-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    3

    The closest date to today...with a twist!

    Hi!

    I am looking for a formula that will do the following:

    Extract the invoice closest (date) to today by customer. see below.

    -DateProject.PNG


    If anyone has an easy solution...

    Thanks to you all
    Last edited by Maple1; 02-01-2018 at 11:58 AM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,359

    Re: The closest date to today...with a twist!

    Attach a sample workbook (not image).

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate.

    Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,503

    Re: The closest date to today...with a twist!

    are you saying you want the latest date for EACH vendor or the vendor with the latest date? In other words, the latest date for Castel ltd AND the latest date for Anneton ltd or just the vendor with the latest date?
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,359

    Re: The closest date to today...with a twist!

    Or try

    =MAX(IF(A1:A1000="ABC",C1:C1000))

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    This will the latest invoice date which must be less than today (unless you have future-dated invoices)

  5. #5
    Registered User
    Join Date
    12-03-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: The closest date to today...with a twist!

    The invoice that is the closest to today for each vendor in the list!

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,139

    Re: The closest date to today...with a twist!

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential information is removed first!!

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,428

    Re: The closest date to today...with a twist!

    What's the 'twist'?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. VBA to loop through range to find date closest to today's date
    By esbencito in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-06-2017, 02:08 AM
  2. [SOLVED] Match using today's date or next closest date
    By BobZZ in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-12-2017, 12:13 AM
  3. [SOLVED] Adjust EOMONTH formula to return closest end of month date to today?
    By nobodyukno in forum Excel General
    Replies: 8
    Last Post: 01-19-2017, 07:51 PM
  4. [SOLVED] Find closest date to today in a row of dates
    By scottmcclean in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-17-2014, 04:29 PM
  5. [SOLVED] Formula to find date closest to today
    By mattress58 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-09-2014, 12:18 PM
  6. [SOLVED] Find Entry With Closest Date and Time to Today
    By Steve N. in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-13-2012, 06:09 PM
  7. Finding the closest future date from Today from a list of dates
    By maharg in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-18-2008, 09:45 AM

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