+ Reply to Thread
Results 1 to 7 of 7

Thread: Using Vlookup & Data Validation

  1. #1
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    riyadh
    MS-Off Ver
    Excel 2003
    Posts
    413

    Using Vlookup & Data Validation

    Hello,

    I am trying to list of contact details for a group. let say if i select a group Bilad & Merad it should list all the hospital and clinic belongs to this group.

    any idea how to do this, please help me.

    Thanks in advance
    Best Regards
    Attached Files Attached Files
    Last edited by NBVC; 01-11-2012 at 12:26 PM.

  2. #2
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: Using Vlookup & Data Validation

    In B18, try:

    =IFERROR(INDEX(Database!$A$2:$A$500,SMALL(IF(Database!C2:C500=$D$3,ROW(Database!$A$2:$A$500)-ROW(Database!$A$2)+1),ROWS($B$18:$B18))),"")
    confirmed with CTRL+SHIFT+ENTER and copied down.

    The other VLOOKUPs in the other columns should be okay.
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  3. #3
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    riyadh
    MS-Off Ver
    Excel 2003
    Posts
    413

    Re: Using Vlookup & Data Validation

    thanks for replying. but it is giving wrong list. for example i am selecting Bilad & Merad in D3 it should list these 2 providers details below.

    Al Belad Medical Clinic مستوصف البلاد الطبي Bilad & Merad
    Merad Medical Clinic مستوصف ميراد ج الطبي Bilad & Merad

  4. #4
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: Using Vlookup & Data Validation

    I neglected to make one range absolute...

    try:

    =IFERROR(INDEX(Database!$A$2:$A$500,SMALL(IF(Database!$C$2:$C$500=$D$3,ROW(Database!$A$2:$A$500)-ROW(Database!$A$2)+1),ROWS($B$18:$B18))),"")
    confirmed with CTRL+SHIFT+ENTER.

    If you want to ignore the Aleem from row 2, then start all ranges in above formula at row 3....ie replace $2 with $3
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  5. #5
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    riyadh
    MS-Off Ver
    Excel 2003
    Posts
    413

    Re: Using Vlookup & Data Validation

    Thank you very much i really appreciated your help. God bless you friend.

    their is small error. if i leave d3 empty it shows #N/A
    #N/A
    #N/A
    in each cell

    any solution for this.
    Last edited by hecgroups; 01-11-2012 at 12:25 PM. Reason: update the information

  6. #6
    Forum Guru Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    5,590

    Re: Using Vlookup & Data Validation

    Is this non-array solution what you are looking for?

    I have rearranged your sheet a little to make it easier to maintain and also make it dynamic.

    Your database should be sorted on "Provider Group" also I removed what appeared a redundant entry.

    Select from the drop-down in C3
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However, if this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
    Also
    If you are satisfied by any members response to your problem please consider using the small Star icon botom left of thier post to show your appreciation.

  7. #7
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: Using Vlookup & Data Validation

    Quote Originally Posted by hecgroups View Post
    Thank you very much i really appreciated your help. God bless you friend.

    their is small error. if i leave d3 empty it shows #N/A
    #N/A
    #N/A
    in each cell

    any solution for this.
    You can precede the formula with an IF check:

    =IF($D$3="","",IFERROR(INDEX(Database!$A$2:$A$500,SMALL(IF(Database!$C$2:$C$500=$D$3,ROW(Database!$A$2:$A$500)-ROW(Database!$A$2)+1),ROWS($B$18:$B18))),""))
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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.2.0