+ Reply to Thread
Results 1 to 7 of 7

Searchable Excel phone directory problem

  1. #1
    Registered User
    Join Date
    04-21-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2007
    Posts
    13

    Searchable Excel phone directory problem

    Hi,
    I am trying to return information from a table based on entering a person's surname and then have that person's phone number and extension, mobile number and role/title returned using vlookup.

    I have been successful in that it works until I enter a surname which has more than one instance. It will only return the first instance.

    Is there a way that if a surname is entered and there is more than one occurence, then all the first names appear as a dropdown under the First name cell and once a first name is selected, the rest of the data is pulled across for the selected person?

    I have attached the spreadsheet for reference. The first sheet entitled "Search" lets you enter the surname and first name and all the relevant data is pulled from Sheet 2 entitled "All_Offices"

    Kindest regards
    Attached Files Attached Files

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Searchable Excel phone directory problem

    It's a little complicate issue..

    We create a dynamic list of the Surnames that are more than one time. In JI, this ARRAY formula.

    =IFERROR(IF(COUNTIF(Surnames;Search!$B$4)<=1;"";INDEX(All_Offices!$B$2:$B$1000;SMALL(IF(All_Offices!$A$2:$A$1000=$B$4;ROW(All_Offices!$B$2:$B$1000)-1);ROW(All_Offices!B1))));"")

    We create a dynamic range Name.

    =OFFSET(Search!$J$1;0;0;MATCH("*";Search!$J:$J;-1);1)

    In A4 we create a validation list using this formula.

    =IF(COUNTIF(Surnames;B4)>1;Names;"")

    We use also a conditinal formatting rules this formula for the case of more than 1 Surname.

    =COUNTIF(Surnames;$B$4)>1

    Then in E2, we use this ARRAY formula.

    =IFERROR(IF(AND($A$4="";COUNTIF(Surnames;$B$4)<2);INDEX(All_Offices!B$2:B$1000;MATCH($B$4;All_Offices!$A$2:$A$1000;0));INDEX(All_Offices!B$2:B$1000;MATCH(Search!$A$4&Search!$B$4;All_Offices!$B$2:$B$1000&All_Offices!$A$2:$A$1000;0)));"Name??")
    Attached Files Attached Files
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    04-21-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Searchable Excel phone directory problem

    That's brilliant. Worked like a charm. Thank you very much

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Searchable Excel phone directory problem

    ......................

  5. #5
    Registered User
    Join Date
    06-27-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Searchable Excel phone directory problem

    Nice Job On the phonebook

  6. #6
    Registered User
    Join Date
    01-14-2017
    Location
    Harare, Zimbabwe
    MS-Off Ver
    MS Office 2016 (Mac)
    Posts
    2

    Re: Searchable Excel phone directory problem

    Hey

    I have a contact list with the headings "Contact Person", "Company", "Phone Number", "Cellphone Number", "Email", etc. I want to be able to search for the contact and have is search from either "Contact person" column or the "company" column. Please help

  7. #7
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Searchable Excel phone directory problem

    @Supre
    I think you should start your own thread with your problem.
    Last edited by sandy666; 01-14-2017 at 07:03 AM.

+ 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