+ Reply to Thread
Results 1 to 4 of 4

Why is this VLOOKUP formula not working?

  1. #1
    Registered User
    Join Date
    12-27-2011
    Location
    Bangladesh
    MS-Off Ver
    Excel 2016
    Posts
    65

    Why is this VLOOKUP formula not working?

    Hi everyone,

    In this workbook, there is a Duty sheet where duties are given to persons on different dates. In next sheet I want to extract the names,designations and departments of the persons based on a date given in A2.

    I used a VLOOKUP formula, please help me correct it.

    See the file attached. (I am sorry that I used my language font in data field, but the column heading in English)

    Attach File is not working So see this file link: https://onedrive.live.com/redir?resi...nt=file%2cxlsx

    Thanks in Advance

    Haque

  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: Why is this VLOOKUP formula not working?

    Hello,

    Vlookup tries to find the lookup value in the first column of the lookup range and returns a value from the columns to the right. Your formula is

    =VLOOKUP(A2,Duty!$B$2:$G$21,2,FALSE)

    So Vlookup takes the value in A2 and tries to find it in cells B2:B21 on the Duty sheet. That range does not have dates, but names. The date is not found, so the #N/A error shows in the cell.

    Vlookup is clearly not working in this scenario.

    Could you please try to explain what you would like to achieve? I see text that looks like dates in columns G to O, many values appear multiple times.

    Please explain what the result should be on the "Date wise" sheet and what the logic is that leads to that result.

    cheers, teylyn

  3. #3
    Registered User
    Join Date
    12-27-2011
    Location
    Bangladesh
    MS-Off Ver
    Excel 2016
    Posts
    65
    Quote Originally Posted by teylyn View Post
    Hello,

    Vlookup tries to find the lookup value in the first column of the lookup range and returns a value from the columns to the right. Your formula is

    =VLOOKUP(A2,Duty!$B$2:$G$21,2,FALSE)

    So Vlookup takes the value in A2 and tries to find it in cells B2:B21 on the Duty sheet. That range does not have dates, but names. The date is not found, so the #N/A error shows in the cell.

    Vlookup is clearly not working in this scenario.

    Could you please try to explain what you would like to achieve? I see text that looks like dates in columns G to O, many values appear multiple times.

    Please explain what the result should be on the "Date wise" sheet and what the logic is that leads to that result.

    cheers, teylyn
    Hi,
    Thanks for your reply.

    Actually, in the date wise sheet, I want that if put a date in A2, the name, designation and department names should be returned. For example, in the Duty sheet there are, say, 20 people but all of them are not assined duty on 20/4/16. I want only those people's details in the Date wise sheet.
    I don't know which formula is applicable here. Please frame formulas of your choice for the desired result.
    Regards
    Haque

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

    Re: Why is this VLOOKUP formula not working?

    Formulas that extract a list of values from another sheet are fairly complicated. Consider other scenarios.

    You could turn on Autofilter in the Duty sheet, then use the filter buttons in the respective columns to show the list of people on duty.

    Or use a completely different data architecture. One data entry sheet with columns for Name, Designation, Department, College, Cell, and Date.
    Enter one row of data per person per date, i.e. if a person has duty on four days, then you must enter four rows for that person with four different dates.

    On the other sheet you can then build a pivot table that shows the columns you want to see in a tabular form and filter by the desired date.

    cheers, teylyn

+ 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. Vlookup value not working because of formula?
    By mikey42979 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-07-2014, 12:11 AM
  2. [SOLVED] VLOOKUP Formula not working, please help!
    By andrew93hughes in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-27-2013, 04:39 AM
  3. [SOLVED] Vlookup formula not working
    By Ronmac in forum Excel Formulas & Functions
    Replies: 27
    Last Post: 08-25-2013, 06:00 PM
  4. Excel 2007 : Vlookup formula not working
    By jana1120 in forum Excel General
    Replies: 2
    Last Post: 05-16-2012, 08:19 AM
  5. Vlookup Formula not working...
    By Swambo in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-15-2011, 05:31 PM
  6. Vlookup formula not working
    By rbwen in forum Excel General
    Replies: 7
    Last Post: 12-08-2011, 08:12 PM
  7. Why is my Vlookup formula not working?
    By Kleinstein in forum Excel General
    Replies: 2
    Last Post: 07-08-2010, 07:38 AM

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