+ Reply to Thread
Results 1 to 6 of 6

Assistance with Array Function for Date Calculation

  1. #1
    Registered User
    Join Date
    06-12-2012
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2016
    Posts
    12

    Exclamation Assistance with Array Function for Date Calculation

    Hi all,

    I've created a spreadsheet full of formulas to work out dates for meetings and when to call for papers, etc. One of the columns is calculated from a rigid set of dates using an array formula, whereas everything else is calculated from the main input date. I need assistance to make the array function work better.

    At the moment, I'm using the MAX function with <, it is picking the nearest date before the date in row K. When using MIN and >, it gives me the nearest date after row K. I'm trying to make it so that the date which appears in row D is the nearest date on the SMTDates range regardless of past or future so long as it falls between the dates in rows C and F. I've tried utilising the INDEX function, but have been unable to make that work to any great effect either.
    Attached Files Attached Files
    Last edited by Kitsune; 07-27-2017 at 11:49 AM. Reason: Added sample workbook

  2. #2
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Assistance with Array Function for Date Calculation

    Attach your workbook directly here, please.

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

  3. #3
    Registered User
    Join Date
    06-12-2012
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2016
    Posts
    12

    Re: Assistance with Array Function for Date Calculation

    Ah, I was wondering how to attach. I've added it now.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,562

    Re: Assistance with Array Function for Date Calculation

    This proposed solution uses two helper columns headed 'Max <' and 'Min >', which may be hidden for aesthetic purposes. The formulas for the two helpers could be incorporated into the formula for column D, but I feel that it is easier to see what they are doing if they are separated.
    The array entered formula that populates the 'Max <' column is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The array entered formula that populates the 'Min >' column is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The array entered formula that populates column D is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    *Array entered formulas are 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.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    06-12-2012
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2016
    Posts
    12

    Re: Assistance with Array Function for Date Calculation

    Aaah! I see what you did there. It didn't occur to me to add more columns for calculation.

    Thank you again, JeteMc, you've been super helpful to this daft novice. Have an amazing day.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,562

    Re: Assistance with Array Function for Date Calculation

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools link above your first post. I hope that you have a blessed day.

+ 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. Calculation / Formula Assistance
    By bdav1216 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-03-2016, 10:59 AM
  2. [SOLVED] Date Function (Rent calculation)
    By Naseeer in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-29-2015, 12:31 AM
  3. [SOLVED] Assistance with Minimum Length array function
    By arkan01d in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-13-2014, 09:09 PM
  4. COUNT/COUNTIF function with date calculation
    By Jayana in forum Excel General
    Replies: 4
    Last Post: 05-28-2012, 01:19 AM
  5. IF and SUM Column Calculation assistance
    By MJLX in forum Excel General
    Replies: 12
    Last Post: 07-07-2009, 04:53 PM
  6. Calculation assistance please
    By Danny William in forum Excel General
    Replies: 7
    Last Post: 07-16-2008, 01:30 PM
  7. Help With Date Calculation Function
    By dvent in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-05-2008, 10:13 AM

Tags for this Thread

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