+ Reply to Thread
Results 1 to 4 of 4

Lookup with Hours and Minutes

Hybrid View

Peter00 Lookup with Hours and Minutes 02-04-2011, 01:52 PM
NBVC Re: Lookup with Hours and... 02-04-2011, 02:08 PM
Peter00 Re: Lookup with Hours and... 02-04-2011, 02:12 PM
NBVC Re: Lookup with Hours and... 02-04-2011, 02:12 PM
  1. #1
    Registered User
    Join Date
    01-31-2011
    Location
    Arnprior, Canada
    MS-Off Ver
    Excel 2000
    Posts
    8

    Lookup with Hours and Minutes

    I believe this is just more of a syntax problem, but I'm trying to lookup a number based on the hour and minute it occured, but not the second.

    =VLOOKUP(AND(HOUR(D3),MINUTE(D3)),A3:B16,2,FALSE)

    The setup is that I have a machine that runs at a certain rate at each minute, and material gets fed into at different intervals, which last only a few seconds. I'm trying to determine how much material is being fed by multiplying run speed by run time. However, I need the lookup to have the right run speed for each run time.

    I have attached a sample of the data.

    Thanks in advance for your help,

    Peter
    Attached Files Attached Files
    Last edited by Peter00; 02-04-2011 at 02:12 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Lookup with Hours and Minutes

    Perhaps:

    =VLOOKUP(INT(D3)+TIME(HOUR(D3),MINUTE(D3),0),$A$3:$B$16,2,FALSE)

    I have included the date, I assume if you have multiple dates, that it matters?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    01-31-2011
    Location
    Arnprior, Canada
    MS-Off Ver
    Excel 2000
    Posts
    8

    Re: Lookup with Hours and Minutes

    Just made the range constant, but other than that, it's all good!

    Thanks alot!

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Lookup with Hours and Minutes

    If you want to base strictly on time, and the return values are numbers as per sample, then you can try:

    =SUMPRODUCT(--(ROUND(MOD($A$3:$A$16,1),5)=ROUND(TIME(HOUR(D3),MINUTE(D3),0),5)),$B$3:$B$16)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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