+ Reply to Thread
Results 1 to 4 of 4

vlookups w/i time frame

  1. #1
    Registered User
    Join Date
    12-12-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    12

    vlookups w/i time frame

    I keep running into projects where I need to know if a person had an order within X hrs (or x days) of a separate order. I have attached a sample spreadsheet where I am looking to populate column C with a formula. I'm not sure if vlookup, VBA, or using access would be best to find this. I have tried creating a column combining person id and order date time, then rounding the date times to the nearest 8 hrs. Although that works, it doesn't always flag correctly since the apple order could be at the low end of the rounding interval and the pear order could be at the upper end of the rounding interval. Any thoughts or ideas would be appreciated.

    Andrew V. Romero
    Attached Files Attached Files

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: vlookups w/i time frame

    This seems to work:

    Please Login or Register  to view this content.
    Last edited by xladept; 11-09-2018 at 07:25 PM.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    12-12-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    12

    Re: vlookups w/i time frame

    Thanks, this is working well. I'll be curious to see how it performs with large data sets. Are nested for loops faster than vlookups?

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: vlookups w/i time frame

    You're welcome and thanks for the rep!

    I don't know about nested loops and vlookups but vlookups can get bound on large data sets.

    If it's too slow on your large set, we could code it into an array

    Please Login or Register  to view this content.
    Last edited by xladept; 11-12-2018 at 07:41 PM.

+ 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. Subtracting after a certain time frame
    By Dahonu in forum Excel General
    Replies: 12
    Last Post: 09-28-2015, 12:33 PM
  2. [SOLVED] Looping through controls by frame on userform (frame within a frame)
    By njs27 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-27-2015, 10:21 AM
  3. [SOLVED] time line adding a specific time frame in each additional cell
    By RobertM01 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-23-2014, 10:22 AM
  4. vlookup time frame to match ceiling time
    By mrprofit in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-22-2014, 03:12 AM
  5. Time Frame Collation
    By Kernel.Panic in forum Excel General
    Replies: 1
    Last Post: 02-16-2013, 12:18 AM
  6. [SOLVED] Calculate Time between 2 dates and if within time frame
    By halfpint123 in forum Excel General
    Replies: 6
    Last Post: 04-11-2012, 09:45 AM
  7. 3 Time frame
    By 11050204 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-26-2005, 10: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