+ Reply to Thread
Results 1 to 10 of 10

double v,hLookUp

  1. #1
    Registered User
    Join Date
    01-21-2012
    Location
    Bucharest
    MS-Off Ver
    Excel 2003
    Posts
    27

    Exclamation double v,hLookUp

    Hi,

    I have a hunch, a double vlookup is the solution to my problem. But I can't get it to work, cause of the troublesome A, B, columns. They must contain hours and minutes, where A are the hours and B are the minutes. Formating is regardless.

    I have this table:

    Book1.xlsx

    I need to create a function, in a single cell, that will return my exact percentage, from today(), and column A, B. For example, if today is the 17th of May, and the current hour is 14:05, the percentage would be 9%. If it would be 20th of May, and the current hour is 15:45, the percentage would be 14%. Basically, every half and hour, the percentage in the cell should change.

    Please help,
    Thanks in advance,
    Dorian
    Last edited by DorianGrim; 05-12-2015 at 09:22 AM. Reason: look not loop

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

    Re: double v,hLookUp

    Try something like:

    =SUMIFS(INDEX($C$2:$AG$27,0,MATCH(TODAY(),$C$1:$AG$1,0)),$A$2:$A$27,HOUR(NOW()),$B$2:$B$27,"<="&MINUTE(NOW()))

    formatted as percentage.
    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
    Forum Contributor jayajaya_4's Avatar
    Join Date
    05-09-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    259

    Re: double v,hLookUp

    its an interesting challenge...to go for...do u have any criteria fields...in sheet ,really col A and B are creating problems

  4. #4
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: double v,hLookUp

    A different method. See attached.
    Attached Files Attached Files
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  5. #5
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,913

    Re: double v,hLookUp

    =LOOKUP(MOD(NOW(),1),TIME(A2:A27,B2:B27,0),INDEX(C2:AG27,,MATCH(NOW(),C1:AG1)))
    Try this
    It will give a number in decimals change the cell format to "%"
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  6. #6
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: double v,hLookUp

    =INDEX(Sheet1!$C$1:$AH$27,MATCH($B3,Sheet1!$C$1:$C$27,1),MATCH(C$2,Sheet1!$C$1:$AH$1,0))
    Attached Files Attached Files

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

    Re: double v,hLookUp

    Actually, SUMIFS is not the right function...

    try instead:


    =LOOKUP(2,1/(($A$2:$A$27=HOUR(NOW()))*($B$2:$B$27<=MINUTE(NOW()))),INDEX($C$2:$AG$27,0,MATCH(TODAY(),$C$1:$AG$1,0)))

  8. #8
    Registered User
    Join Date
    01-21-2012
    Location
    Bucharest
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: double v,hLookUp

    Quote Originally Posted by NBVC View Post
    Actually, SUMIFS is not the right function...

    try instead:


    =LOOKUP(2,1/(($A$2:$A$27=HOUR(NOW()))*($B$2:$B$27<=MINUTE(NOW()))),INDEX($C$2:$AG$27,0,MATCH(TODAY(),$C$1:$AG$1,0)))
    Refferincing the cell where the formula is returns 0. Why would that happen?

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

    Re: double v,hLookUp

    You have to format the cell as percentage.

  10. #10
    Registered User
    Join Date
    01-21-2012
    Location
    Bucharest
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: double v,hLookUp

    Quote Originally Posted by DorianGrim View Post
    Refferincing the cell where the formula is returns 0. Why would that happen?
    Nevermind, I had to percentage the cell.

+ 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. Double click cell - copy data to new sheet - create a list from double clicking
    By kakky in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-04-2015, 11:14 PM
  2. [SOLVED] Before double click event with if statements (Double clicking blank cell stops bdc firing)
    By camdenpars in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-27-2014, 09:03 AM
  3. Copy double-clicked cell to next empty row in different sheet with each double-click
    By erhathaway in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-25-2013, 12:06 AM
  4. vlookup, hloopup or index function
    By Dharmesh in forum Excel General
    Replies: 1
    Last Post: 01-23-2008, 12:13 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