+ Reply to Thread
Results 1 to 4 of 4

VBA for an Array / VLOOKUP

  1. #1
    Registered User
    Join Date
    06-20-2019
    Location
    Minnesota
    MS-Off Ver
    Office 2019
    Posts
    39

    VBA for an Array / VLOOKUP

    Hello! I currently have a list of 350 names, and each name has an associated job title. I would like to create a VBA (I believe) that will allow me to simply check against this list in other workbooks. I would like to be able to type in a name and have the cell next to the typed name check against my list that I created to see what the job title associated with the name that I input is. I was able to do it with a macro and vlookup by calling to a workbook that I have open, but it's very messy and works decently, but it's a bit of a hassle. I am a novice Excel user, so any help would be greatly appreciated!

    PS - the kicker with this is that I would like to be able to share it with other people who need to check the same names against the same list, so if its possible to do that, it would be great!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: VBA for an Array / VLOOKUP

    Not really sure you need VBA for this, a regular vlookup should do it for you?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    06-20-2019
    Location
    Minnesota
    MS-Off Ver
    Office 2019
    Posts
    39

    Re: VBA for an Array / VLOOKUP

    Hey Fdibbins!

    Again - I'm a novice Excel user. Would the vlookup be able to check against a seperate workbook? Also, would it be too much for one formula since it deals with 350 or so names and titles?

    Thanks in advance!

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: VBA for an Array / VLOOKUP

    Yup, vlookup can easily access a different workbook (file), and searching through 350 records should be a quick and simple process.

    VLOOKUP works exactly the same withing the same sheet, between sheets or between workbooks (and even works on closed workbooks). I would set it up with both files open, then use the mouse to reference the cells and ranges, just as you would withing the same sheet.

    So your formula would look something like this....
    =VLOOKUP(G2,[PERSONAL.XLSB]Storage!$I$2:$K$21,2,0)

+ 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. Replies: 4
    Last Post: 04-25-2017, 11:01 AM
  2. Replies: 2
    Last Post: 01-12-2013, 03:42 PM
  3. Replies: 2
    Last Post: 06-01-2011, 07:43 AM
  4. Replies: 2
    Last Post: 02-23-2011, 07:24 AM
  5. Replies: 2
    Last Post: 05-25-2010, 11:48 AM
  6. Using Vlookup to lookup array, return array
    By jcampbell in forum Excel General
    Replies: 5
    Last Post: 11-16-2007, 01:13 PM
  7. Which is faster: VLOOKUP-worksheet or VB-array VLOOKUP?
    By erikhs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-06-2006, 01:25 PM

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