+ Reply to Thread
Results 1 to 6 of 6

My Vlookup returns the wrong info

  1. #1
    Registered User
    Join Date
    01-08-2013
    Location
    Concord, NC
    MS-Off Ver
    Excel 2007
    Posts
    5

    My Vlookup returns the wrong info

    I am attaching the file I use everyday. I create and hourly report that summarizes the previous intervals, calls. The hourly report is tedious and I thought I could use Excel to speed it up but I am running into some problems.

    MyStatsCALC.xlsx
    I am trying to tell StatsCalc!G5, StatsCAlc!G15, and StatsCalc!G25 to return a forecasted number of calls based on a vlookup using now() rounded to the last hour as the value. The formulas seems to work fine after noon, but the AM the values are always a half hour behind (10 am is displaying the 9:30 number)...this gives me an incorrect forecast percentage.

    All the data on STAT.DATA is pasted from other sources, I report at the top of the hour for previous intervals, which is why I have totals in STAT.DATA! coulmns P,R,T.

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

    Re: My Vlookup returns the wrong info

    What is the purpose of this?
    FLOOR(MINUTE(NOW()),60)

    That is always going to just be 0 right? So why not just put 0..

    Don't know if that is the issue, but just an FYI..will improve performance a bit..


    I think the issue is likely a "Floating Point Precision" issue.

    Making it 1 second instead of 0, seems to pull the correct info.

    B5: =IF(B15>0,VALUE(B15),VLOOKUP(TIME(HOUR(NOW()),0,1),STAT.DATA!$O$2:$U$50,2))

  3. #3
    Forum Contributor
    Join Date
    09-11-2009
    Location
    Paris
    MS-Off Ver
    Excel 2003
    Posts
    102

    Re: My Vlookup returns the wrong info

    Hi,
    You use the function "Floor" with date/time is not correct!
    Pls find attached file for your reference,

    Hope this helps,
    Attached Files Attached Files

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

    Re: My Vlookup returns the wrong info

    Quote Originally Posted by duanzhuanming View Post
    Hi,
    You use the function "Floor" with date/time is not correct!
    Pls find attached file for your reference,

    Hope this helps,
    I believe the OP 'Wants' to retrieve data based on the time rounded down to the hour, not half hour.

  5. #5
    Registered User
    Join Date
    01-08-2013
    Location
    Concord, NC
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: My Vlookup returns the wrong info

    Jonmo1, you're the best. I was afraid that I was explaining poorly but this works perfectly. I'm currently taking Excel courses and using it on my job, my basic knowledge doesn't always get me where I'm trying to go (I was useing Floor to round down the hour, this was the only method I knew to force a time that I wanted). I appreciate that you included something for me to read up on too, that helps me understand where I went wrong.

    Quote Originally Posted by Jonmo1 View Post
    What is the purpose of this?
    FLOOR(MINUTE(NOW()),60)

    That is always going to just be 0 right? So why not just put 0..

    Don't know if that is the issue, but just an FYI..will improve performance a bit..


    I think the issue is likely a "Floating Point Precision" issue.

    Making it 1 second instead of 0, seems to pull the correct info.

    B5: =IF(B15>0,VALUE(B15),VLOOKUP(TIME(HOUR(NOW()),0,1),STAT.DATA!$O$2:$U$50,2))

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

    Re: My Vlookup returns the wrong info

    Glad to help, thanks for the feedback.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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