+ Reply to Thread
Results 1 to 6 of 6

Using v lookup but getting the same value due to same range issue

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Using v lookup but getting the same value due to same range issue

    I have these value in column a and b of my sheet 1

    employee rocord
    a 1
    b 3
    d 4
    a 6

    in sheet 2 employee are arranged and using vlookup

    result is

    employ record
    a 1
    a 1
    b 3
    d 4
    a 1


    formula using:=vlookup(sheet2!a2,sheet1!a$2:b$5,2,0)

    how to solve this issue: Kindly guide other formula by which the result coulb be:

    Employ record
    a 1
    a 6
    b 3
    d 4
    a n/a




    kindly assist

  2. #2
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Using v lookup but getting the same value due to same range issue

    sry in arrangment it shd be like

    in sheet 2 employee are arranged and using vlookup

    result is

    employ record
    a 1
    a 1
    a 1
    b 3
    d 4



    formula using:=vlookup(sheet2!a2,sheet1!a$2:b$5,2,0)

    how to solve this issue: Kindly guide other formula by which the result coulb be:

    Employ record
    a 1
    a 6
    a n/a
    b 3
    d 4

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Using v lookup but getting the same value due to same range issue

    Using this array formula:
    =INDEX(Sheet1!B:B,SMALL(IF(Sheet1!$A$2:$A$5=Sheet2!A2,ROW(Sheet1!$A$2:$A$5)),COUNTIF(Sheet2!$A$2:A2,Sheet2!A2)))

    assuming all data start on row 2...

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Using v lookup but getting the same value due to same range issue

    Of course, if you want rid of the error message at the last "a", use:

    =IFERROR(INDEX(Sheet1!B:B,SMALL(IF(Sheet1!$A$2:$A$5=Sheet2!A2,ROW(Sheet1!$A$2:$A$5)),COUNTIF(Sheet2!$A$2:A2,Sheet2!A2))),"")

    and the formula will return a blank.

  5. #5
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Using v lookup but getting the same value due to same range issue

    very nice -thank you

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Using v lookup but getting the same value due to same range issue

    You're welcome, and thanks for the Rep.

+ 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] VLOOKUP, gives #N/A error (if Range lookup=0) or wrong data (if Range lookup=empty)
    By Ebalinska in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 01-14-2016, 05:55 AM
  2. Lookup Formula Issue, Search issue
    By kperitz in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 04-07-2014, 01:50 PM
  3. lookup issue
    By an63lu5 in forum Excel General
    Replies: 8
    Last Post: 05-02-2012, 09:51 PM
  4. Lookup value issue
    By leo73pk in forum Excel General
    Replies: 4
    Last Post: 03-07-2011, 03:08 PM
  5. Lookup issue
    By sigfreid in forum Excel General
    Replies: 2
    Last Post: 04-19-2009, 08:08 PM
  6. lookup issue
    By eicabc in forum Excel General
    Replies: 1
    Last Post: 02-24-2009, 08:04 PM
  7. Lookup issue.
    By punter in forum Excel General
    Replies: 3
    Last Post: 03-10-2008, 09: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