+ Reply to Thread
Results 1 to 11 of 11

How to get minimum date using an array

  1. #1
    Forum Contributor
    Join Date
    05-11-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    242

    How to get minimum date using an array

    Dear Friends,

    PFA

    In column N, O, I need to get the start date and end date. I have given the formula (with array) using google search.
    But I am unable to get the correct result in cells marked in yellow.

    The total rows would be around 2000 and would be increasing every month.

    Can you help me with the formula which could get me the result automatically once col. A is updated.

    Please assist.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel (Windows 11 64-bit)
    Posts
    60,606

    Re: How to get minimum date using an array

    This is not a Windows issue - I have moved the thread to an appropriate section.
    Ali


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


    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.56 for Mac (home)
    Posts
    7,563

    Re: How to get minimum date using an array

    could you explain what makes office C the min of July 1 2018 for a start date and the max date of June 30 2027 the wrong dates as returned?
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Forum Contributor
    Join Date
    05-11-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    242

    Re: How to get minimum date using an array

    Dear Sambo,

    There are different sub-offices in office C which are rented.
    So in office C, min. start date is 1st Jul 18 (col N) and last end date is 30th Jun 27 (col O)

    Please assist.

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.56 for Mac (home)
    Posts
    7,563

    Re: How to get minimum date using an array

    your explanation is not helping. As it is now the min being returned for office C is 1st Jul 18 and the max is 30th Jun 27 so I'm at a loss about why you think the returned values are incorrect.
    Right now the formula is looking at city C (col C) and using that alone it is returning the values you have in yellow and say are not correct. But what is being returned looks correct to me. If you have other criteria it needs to be entered somewhere so it can be used in the formula.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... based in Ireland... but I could be anywhere in the world
    MS-Off Ver
    Office 365 for PC.
    Posts
    34,104

    Re: How to get minimum date using an array

    I am a bit confused.... Is your current formula giving you an incorrect answer?

    It is ineffieicent, as you will never have 1,000,000 rows....
    Glenn



  7. #7
    Forum Contributor
    Join Date
    05-11-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    242

    Re: How to get minimum date using an array

    In my excel,
    N7= 00-Jan-00
    O7 = 00-Jan-00.

    That's why I am confused.

    Can you please send your updated sheet for my reference.

  8. #8
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.56 for Mac (home)
    Posts
    7,563

    Re: How to get minimum date using an array

    this is your version, I didn't change anything.

    BTW, you don't need the plus sign in front of the formulas, I'm told that is a left over from long ago.
    Attached Files Attached Files
    Last edited by Sam Capricci; 07-19-2019 at 08:55 AM.

  9. #9
    Forum Contributor
    Join Date
    05-11-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    242

    Re: How to get minimum date using an array

    Thanks..
    when I open the file, I get following error "Excel ran out of resources while attempting to calculate one or more formula. As a result there formula can not be evaluated."

    That's why I am unable to see the correct result.

    How do I solve this problem ???

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... based in Ireland... but I could be anywhere in the world
    MS-Off Ver
    Office 365 for PC.
    Posts
    34,104

    Re: How to get minimum date using an array

    That error happened becasue you are getting it to calculate ore than a million rows. Not sensible. Cut down the ranges.

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files

  11. #11
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.56 for Mac (home)
    Posts
    7,563

    Re: How to get minimum date using an array

    I think the problem is as Glenn noted, you have the whole column you are accessing, try limiting your ranges, maybe something like
    {=MIN(IF($C$2:$C$1000=C2,$D$2:$D$1000))} and {=MAX(IF($C$2:$C$1000=C2,$E$2:$E$1000))}
    of course entered with ctrl + shift + enter to activate.

+ 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. [SOLVED] array minimum date if text from one cell is found in another cell
    By sinkerballer in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-26-2017, 02:45 PM
  2. [SOLVED] Maximum and Minimum (not of an array)
    By jimenvais in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 02-25-2017, 07:48 PM
  3. Minimum lookup value using array formulas
    By XanderLo in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-01-2013, 11:26 PM
  4. Display Minimum Value in Array
    By jcarson83 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-23-2013, 06:47 AM
  5. [SOLVED] Finding Second to Minimum number in array?
    By magicbob007 in forum Excel General
    Replies: 12
    Last Post: 04-09-2012, 03:25 PM
  6. Minimum non-zero within array formula
    By Cheeky Charlie in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-31-2008, 12:16 PM
  7. Minimum value and it position in the array
    By vioravis in forum Excel General
    Replies: 2
    Last Post: 09-28-2007, 02:02 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