+ Reply to Thread
Results 1 to 4 of 4

V Look Up within VBA editor

  1. #1
    Registered User
    Join Date
    09-06-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    69

    V Look Up within VBA editor

    Hi,
    I was given this bit of code to run a V Look up from within VBA as opposed to a front end spreadsheet. It works well, but I need to add 2 more names and their departments to their code but I am struggling.

    Here it is now in functioning order with only 3 names and departments:

    eg

    NAME | DEPARTMENT

    James | Electrical
    Eric | Moulding
    Liam | Paintwork
    Sarah | Metalwork
    Matthew | Woodwork



    Please Login or Register  to view this content.
    I would like the names and departments in blue (Sarah and Mathew) to be added to the code, but I can't get it to work...

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: V Look Up within VBA editor

    This should be easier on the eye, add as many individual rows, make sure the last row has a ) for each row above:

    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 03-11-2017 at 10:19 AM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    09-06-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    69

    Re: V Look Up within VBA editor

    Thank you, JBeaucaire -it works! Such a simple explanation!

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,437

    Re: V Look Up within VBA editor

    Maybe this is an easier data construct to maintain.

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

+ 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. Anoter VBA editor
    By zico8 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-25-2016, 04:15 PM
  2. PDF Editor
    By waqarqrl in forum Excel General
    Replies: 3
    Last Post: 10-23-2015, 12:48 AM
  3. Here is a VBA Editor for you to try.
    By mehmetcik in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-01-2015, 05:18 PM
  4. Pop up box:I would use the VB editor
    By Davycc in forum Excel General
    Replies: 2
    Last Post: 09-21-2009, 03:58 PM
  5. VB Editor
    By Sentinel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-28-2006, 04:30 AM
  6. [SOLVED] VB editor bug?
    By John in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-24-2006, 03:35 PM
  7. [SOLVED] VBA Editor
    By Pierre in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-28-2006, 10:35 AM

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