+ Reply to Thread
Results 1 to 2 of 2

VLOOKUP with time - Slightly complicated

  1. #1
    Registered User
    Join Date
    03-13-2015
    Location
    India
    MS-Off Ver
    2013
    Posts
    2

    Exclamation VLOOKUP with time - Slightly complicated

    Hi,

    I am currently designing an excel sheet to help calculate salary and am facing problem with the late coming calculations.

    Basically, my sheet 1 has emp name (column A), in time (Column B) and out time (Col C) and a column D where late coming is calculated by subtracting in time from shift start time and is in hh:mm format..

    In sheet 2,I have done a vlookup of this data to sheet 2 (Column B) against employee name (column A) and this time again is in hh:mm format..

    My scale for late coming deduction is:
    Delay Deduction
    00:05:00 00:30:00
    00:15:00 01:00:00
    00:30:00 01:30:00
    00:45:00 02:00:00
    01:00:00 04:00:00

    When I do a vlookup in sheet 2 as Vlookup (b1,Scale array,2,0), I get #N/A

    All times everywhere is in hh:mm format..

    I have a feeling it is due to Sheet 2 column B has a vlookup formula from sheet A and hence is being considered by excel as a formula

    Pls help!!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: VLOOKUP with time - Slightly complicated

    Hi, welcome to the forum

    I have a feeling it is due to Sheet 2 column B has a vlookup formula from sheet A and hence is being considered by excel as a formula
    Not so. Excel works (generally) with what is displayed in the cell, not what is behind that (formula etc), so you can have whatever formula you like in a cell (=10+5+5), if it displays, say, 20, then that is what excel works with, not the underlying formula.

    You need to understand this about dates (I know, you asked about times, but I feel this is relevant)...a date is just a number indicating how many days have passed since 1/1/1900, so today 7/11/14 is actually 41831. excel formats it into something that we recognise as a date

    Likewise with time...time is a decimal of 1 (day), so for instance 06:00 AM is actually just 0.25, 12 noon is .05 and 06:00 PM (18:00) is 0.75. Again, excel formats it to something we see as a time.


    If you still have a problem, upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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] Problems with VLOOKUP connecting cells that have slightly different spellings
    By chilli76 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-06-2014, 11:38 AM
  2. Replies: 1
    Last Post: 02-06-2014, 12:28 PM
  3. VLOOKUP slightly different text
    By csch123 in forum Excel General
    Replies: 1
    Last Post: 01-31-2013, 03:31 PM
  4. Finding the Median (Slightly more complicated)
    By paul86 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-31-2012, 02:45 PM
  5. Can I get excel to count a date range? but slightly more complicated
    By daybreak in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-07-2011, 04:30 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