+ Reply to Thread
Results 1 to 3 of 3

Array? Search a two column list of Building Names and Building Codes -- return code

  1. #1
    Registered User
    Join Date
    06-20-2011
    Location
    Travelers Rest, SC
    MS-Off Ver
    Excel 2010
    Posts
    47

    Array? Search a two column list of Building Names and Building Codes -- return code

    Not sure if I need an array here -- never used one but it sounds appropriate. I want each cell in column D to populate with the appropriate abbreviation of the building name in Column B and the Office number in Column C, thus creating an "Office Code" for each building and office number. There is a "key" or "legend" of these building abbreviations found in columns E and F.

    For example, John Doe (Column A) works in Johns Hall (column B). His Office number is "1" as found in Column C. Column D should populate with "JHN-1" which it has determined to be the appropriate combination of both the building abbreviation and the office number.

    The list of building names will grow, however. The real list is currently about 60 long so I don't want a nested IF statement that includes 60 building names and counting. Any good solutions??

    The actual sheet is a CSV file but that file was deemed invalid to post by excelforum.com.

    Thanks,

    JoeTempExample.xlsxTempExample.xlsx

  2. #2
    Forum Guru
    Join Date
    05-24-2011
    Location
    Kuwait
    MS-Off Ver
    Office 365
    Posts
    2,200

    Re: Array? Search a two column list of Building Names and Building Codes -- return code

    Hello Joe,

    VLOOKUP should work for you.

    In D2, hen fill down.

    =IFERROR(VLOOKUP(B2,E:F,2,0)&"-"&C2,"")
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  3. #3
    Registered User
    Join Date
    06-20-2011
    Location
    Travelers Rest, SC
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Array? Search a two column list of Building Names and Building Codes -- return code

    Wow man, thanks. I toyed with vlookup, index and match -- but apparently I need some practice! Thanks Haseeb!

    Quote Originally Posted by Haseeb A View Post
    Hello Joe,

    VLOOKUP should work for you.

    In D2, hen fill down.

    =IFERROR(VLOOKUP(B2,E:F,2,0)&"-"&C2,"")

+ 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.6.0 RC 1