+ Reply to Thread
Results 1 to 6 of 6

Vlookup / Min Array question

  1. #1
    Registered User
    Join Date
    09-05-2017
    Location
    Chicago, IL
    MS-Off Ver
    2013
    Posts
    2

    Vlookup / Min Array question

    I'm trying to use =MIN(IF(Lookup_ID=A2,Grad_Year)) to find the minimum Grad date for an ID that has multiple IDs in the data set. Normally I'd use =VLOOKUP(A2,'Grad Info'!A2:B53597,2,FALSE) but the multiple IDs with different Grad dates is throwing me off. I'm looking for the minimum Grad date for a specific ID - not the minimum of the dataset.

    I am using Control + Shift + Enter, is there anything else I'm missing? I keep getting 0's for all the rows, even though 0 is not even the minimum of the Grad dates.
    Attached Files Attached Files

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Vlookup / Min Array question

    welcome to the forum, katharineeileen. you are getting zeros because your years are in text forms. delete your array formulas first because i think you ranged the whole thing and pressed CTRL + SHIFT + ENTER. now use this array formula just for cell B2.
    =MIN(IF(Lookup_ID=A2,--Grad_Year))
    ...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.

    then copy it down.

    seeing you have 50K+ rows, it is a little slow though. you might want to consider using PivotTable and show the MIN Grad Year instead

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Vlookup / Min Array question

    @ benishiryo's I believe that can be entered with just Enter.
    Dave

  4. #4
    Registered User
    Join Date
    09-05-2017
    Location
    Chicago, IL
    MS-Off Ver
    2013
    Posts
    2

    Re: Vlookup / Min Array question

    Wow, I thought I finally had an excel issue that warranted help and it was related to cell type... whoops!

    Thanks so much for your help, that was exactly it. Can I ask what the -- is for (for future knowledge)?

  5. #5
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Vlookup / Min Array question

    @FlameRetired: Unfortunately, you have to use the array formula. the IF formula alone is typically for single cell usage. you cannot use IF(A1:A10="x". basing on OP's eg, it all goes wrong at row 75 onwards once you do not press CTRL + SHIFT + ENTER.

    @katharineeileen: provided that the underlying value of the cell is indeed a number (like in your case where year is merely formatted as a text), the double negations help to convert text formats into numbers. some people prefer these which works too:
    =MIN(IF(Lookup_ID=A2,Grad_Year+0))
    =MIN(IF(Lookup_ID=A2,Grad_Year*1))
    =MIN(IF(Lookup_ID=A2,VALUE(Grad_Year)))

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Vlookup / Min Array question

    Quote Originally Posted by benishiryo View Post
    @FlameRetired: Unfortunately, you have to use the array formula. the IF formula alone is typically for single cell usage. you cannot use IF(A1:A10="x". basing on OP's eg, it all goes wrong at row 75 onwards once you do not press CTRL + SHIFT + ENTER.
    Yup I just noticed that too.

+ 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. Replies: 4
    Last Post: 04-25-2017, 11:01 AM
  2. Question about using Evaluate with an array of formulas not an array formula
    By Mr_Bill in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-19-2014, 03:26 PM
  3. vlookup table array question
    By sunrise06 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-07-2014, 01:01 PM
  4. Question on Table Array in VLOOKUP function
    By w_k_c in forum Excel General
    Replies: 4
    Last Post: 08-06-2014, 12:14 AM
  5. [SOLVED] Quick Array question - Copy array to another array then resize?
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-02-2013, 01:17 AM
  6. If/Min/Vlookup/Array Question
    By goldrings in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-18-2011, 12:39 PM
  7. Excel 2007 : Vlookup or array question
    By NMStorm in forum Excel General
    Replies: 3
    Last Post: 04-08-2010, 04:55 PM

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