+ Reply to Thread
Results 1 to 5 of 5

Lookup with duplicate values & AND Condition

  1. #1
    Forum Contributor
    Join Date
    02-13-2016
    Location
    MUMBAI
    MS-Off Ver
    Microsoft 365
    Posts
    180

    Lookup with duplicate values & AND Condition

    Kindly help me in finding the correct city by formula in the attached excel sheet.

    Thank you.
    Attached Files Attached Files

  2. #2
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Lookup with duplicate values & AND Condition

    =INDEX($C$2:$C$21,MATCH($E$3&$E$7,$A$2:$A$21&$B$2:$B$21,0))

    Array entered for first occurence of city for the selected

    =LOOKUP(2,1/($A$2:$A$21=$E$3)*($B$2:$B$21=$E$7),$C$2:$C$21)

    For last occurence(newest).
    As you did not mention the expected results use either one and if it not ok, then, provide expected results.

  3. #3
    Forum Contributor
    Join Date
    02-13-2016
    Location
    MUMBAI
    MS-Off Ver
    Microsoft 365
    Posts
    180

    Re: Lookup with duplicate values & AND Condition

    Thanks paul..first formula is what i wanted..

    in 2nd one, the result is the city of the last occurrence of the first name & does not considers the last name.

  4. #4
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Lookup with duplicate values & AND Condition

    Apologies for that. Change the second formula to:

    =LOOKUP(2,1/($E$3=$A$2:$A$21)/($E$7=$B$2:$B$21),($C$2:$C$21))

  5. #5
    Forum Contributor
    Join Date
    02-13-2016
    Location
    MUMBAI
    MS-Off Ver
    Microsoft 365
    Posts
    180

    Re: Lookup with duplicate values & AND Condition

    thanks paul..the 2nd one also works well now..

+ 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. To find the duplicate values with certain condition between 2 sheets
    By rukman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-06-2018, 07:29 PM
  2. [SOLVED] Lookup on Duplicate Values
    By arasan25 in forum Excel General
    Replies: 4
    Last Post: 08-20-2017, 10:17 AM
  3. [SOLVED] Condition Formatting duplicate values on the same row
    By JasonNeedsHelp in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-04-2016, 09:56 PM
  4. How to highlight duplicate values after certain condition is met
    By mstjohn1974 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-14-2013, 08:57 AM
  5. [SOLVED] Lookup + Duplicate Values
    By keithmacd in forum Excel General
    Replies: 4
    Last Post: 06-12-2012, 07:49 PM
  6. Need help on how to lookup values that duplicate
    By Pat Parker in forum Excel General
    Replies: 4
    Last Post: 01-26-2012, 11:56 PM
  7. Replies: 2
    Last Post: 09-28-2011, 09:12 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