+ Reply to Thread
Results 1 to 8 of 8

Lookup and/or Match

  1. #1
    Registered User
    Join Date
    03-25-2008
    Posts
    4

    Lookup and/or Match

    I have a workbook that I am using for scheduling staff. On the first worksheet is the dates (row), employee names broken up by department (column), etc. If a staff member is working then "W" is in the cell corresponding cell and if they are working and on call for that night then WC is in the appropriate cell.

    The second worksheet is a schedule of who is on call for the week. Dates are listed in Column A and departments are listed in Row 1. I need to look up the person on call on worksheet one and enter that person's name on worksheet 2.

    Here's the problem - HLOOKUP is not working because I cannot sort the columns in alphabetical order which is required by HLOOKUP. Any suggestions?

    Thank you in advance for your guidance.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    Sounds like you'll need to use INDEX and MATCH but I'm having trouble picturing your first spreadsheet.
    Across the top is Dates
    Down the left (Col A)is department names?
    Col B is Employee names?
    Beneath each date is either a W or WC or blank?

    Thanks

    ChemistB

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    HLOOKUP, like VLOOKUP requires list in ascending order only if you don't include the 4th FALSE argument (or if you use TRUE as that argument).

    So do your HLOOKUP and insert FALSE as a 4th argument.

    Look at HLOOKUP help for detail on how to use the function.
    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.

  4. #4
    Registered User
    Join Date
    03-25-2008
    Posts
    4

    Hlookup = 0

    Thanks for the reply. I did try HLOOKUP using the False argument and it returns "0" when it should give me a name. Any suggestions? I appreciate the guidance.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by KTT
    Thanks for the reply. I did try HLOOKUP using the False argument and it returns "0" when it should give me a name. Any suggestions? I appreciate the guidance.
    Then you either have a blank or you indexed the wrong row and it is seeing a blank...

    The best bet is to post a sample of your sheet here (zipped Excel sheet) and indicate your expected results.

  6. #6
    Registered User
    Join Date
    03-25-2008
    Posts
    4
    Yes, I do have blanks if the employee is not scheduled. Is that the problem?

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    I'd have to see the spreadsheet...and what your formula looks like.

    Please post the sample sheet.

  8. #8
    Registered User
    Join Date
    03-25-2008
    Posts
    4
    Quote Originally Posted by ChemistB
    Sounds like you'll need to use INDEX and MATCH but I'm having trouble picturing your first spreadsheet.
    Across the top is Dates
    Down the left (Col A)is department names?
    Col B is Employee names?
    Beneath each date is either a W or WC or blank?

    Thanks

    ChemistB
    You have this correct except Col A is the employee names separated by department. I am setting the HLOOKUP to search only the employee names within one department.

+ 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