+ Reply to Thread
Results 1 to 4 of 4

Seeking Improvement to "Lookup" Function

  1. #1
    Registered User
    Join Date
    08-10-2012
    Location
    Fort Worth, Texas
    MS-Off Ver
    Excel 2013
    Posts
    3

    Seeking Improvement to "Lookup" Function

    Excel 2013
    Attachment: "Example Lookup.xlsx". Tab 1 "Programs" contain date ranges for when an employee was in a particular "program", tab 2 "YTD" contain employee check dates for the year. The lookup function I'm using,

    {=LOOKUP(2,1/IF(YTD!A2=Programs!$A:$A,YTD!B2>=Programs!B:B),Programs!C:C)}

    correctly pulls the program for the employee based upon the "YTD" Check_DT being greater than or equal to the "Programs" Event_DT. The results in the "YTD" worksheet show the desired results accurately in column C.

    However, the "Programs" will have around 100,000 records and the "YTD" will exceed 500,000 records. Is there a more efficient technique that could be used in this example? Thanks in advance for any guidance!
    Attached Files Attached Files

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Seeking Improvement to "Lookup" Function

    It doesn't need to be entered as an array using this syntax instead

    =LOOKUP(2,1/((YTD!A2=Programs!$A:$A)*(YTD!B2>=Programs!B:B)),Programs!C:C)

    Now 100000 records in the Programs Tab isn't terribly high. I don't see a much more efficient way to do what you're doing.
    Except to NOT use entire column references
    Try
    =LOOKUP(2,1/((YTD!A2=Programs!$A$2:$A$100000)*(YTD!B2>=Programs!B$2:B$100000)),Programs!C$2:C$100000)

    That should make a significant improvement in calculation times.

  3. #3
    Registered User
    Join Date
    08-10-2012
    Location
    Fort Worth, Texas
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: Seeking Improvement to "Lookup" Function

    Jonmo1, appreciate the review and suggestion!

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Seeking Improvement to "Lookup" Function

    You're welcome.

+ 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] how to write a lookup function without a "lookup vector" column
    By luv2glyd in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-13-2015, 03:02 PM
  2. String an "IF" and "LOOKUP" (H or V) function together.
    By khughes46 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-27-2014, 04:53 PM
  3. Replies: 3
    Last Post: 08-01-2013, 04:33 PM
  4. Seeking "Tips of the Trade" for General Improvement of Knowledge
    By genevieveinlondon in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 07-25-2013, 08:55 PM
  5. Replies: 4
    Last Post: 04-13-2013, 07:07 PM
  6. Improvement: new category in the forum: "unsolved questions"
    By bebo021999 in forum Suggestions for Improvement
    Replies: 9
    Last Post: 02-05-2013, 08:02 AM
  7. Replies: 4
    Last Post: 05-29-2005, 09:05 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