+ Reply to Thread
Results 1 to 4 of 4

Text recognition with VLOOKUP?

  1. #1
    Registered User
    Join Date
    02-06-2010
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Question Text recognition with VLOOKUP?

    For staffing/ payroll purposes, I am putting together a spreadsheet which will convert the number of hours a person works in a day to set shift times. I have used a VLOOKUP function with success if standard hours are entered.

    The problems start when I require the program to identify annual leave and public holidays. While numbers have worked, I have not been able to get the VLOOKUP function to recognise text with accuracy. It always puts something in the cell but the data is not accurate.

    Please find attached an example of how I am entering the formula & data I am working with.

    Can I use the VLOOKUP function for this purpose or do i need an alternate formula?

    With thanks
    Attached Files Attached Files

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Text recognition with VLOOKUP?

    Hi Peregrine,

    welcome to the forum.

    you are omitting the last argument of the Vlookup, so it defaults to TRUE. Use

    =VLOOKUP(C6,($J$4:$K$44),2,FALSE)

    and it will return the correct value.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Text recognition with VLOOKUP?

    Hi,

    The VLOOKUP() is returning exactly what you're asking it to do. Why would you expect for instance 9AL to return '8.30 - 5.00 Paid annual leave' when clearly this does not feature in your table.

    However I'd urge you to take a step back and review what you're trying to achieve. If you want to do any sort of date/time arithmetic, and particularly if you are needing to take account of annual leave and public holidays where you will need to incorporate the NETWORKDAYS() function in any solution, then you will need to start with date and time numbers and not strings of text.

    HTH
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    02-06-2010
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Text recognition with VLOOKUP?

    Thankyou to both of you - it was a simple mistake I could not see for looking!

+ 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