+ Reply to Thread
Results 1 to 6 of 6

Pull Contact Name out of Table based on Business Name in same Row using VBA.

  1. #1
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366

    Pull Contact Name out of Table based on Business Name in same Row using VBA.

    Hello All,

    Setup:

    On Sheet1, I have Table1. Table1 contains three columns: Business Name, Contact Name, e-Mail Address.

    On Sheet2, I have ListBox1 which contains Business Name(s).

    When the user selects a Business Name (or Names), and then hits CommandButton1, the remaning code will generate a report.

    How would I make it so that cell D4 on the newly generated report will be equal to the CONTACT NAME, based on the given Business Name?

    I realize this is a tough one...thanks for all of your help in Advance.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,444

    Re: Pull Contact Name out of Table based on Business Name in same Row using VBA.

    Use VLOOKUP with the Business Name as the item you are searching for.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366

    Re: Pull Contact Name out of Table based on Business Name in same Row using VBA.

    How would I do that in VBA?

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,444

    Re: Pull Contact Name out of Table based on Business Name in same Row using VBA.

    Something like:

    Please Login or Register  to view this content.

    Regards, TMS

  5. #5
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366

    Re: Pull Contact Name out of Table based on Business Name in same Row using VBA.

    Excellent!

    I appreciate it.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,444

    Re: Pull Contact Name out of Table based on Business Name in same Row using VBA.

    You're welcome. Thanks for the rep.

+ 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: 1
    Last Post: 04-04-2013, 02:47 PM
  2. access SQL to pull all fields in a table and group them based on their ID
    By ewong in forum Access Programming / VBA / Macros
    Replies: 3
    Last Post: 12-26-2012, 05:18 PM
  3. Business-card data into unique rows per contact?
    By mazingerZ in forum Excel General
    Replies: 4
    Last Post: 09-21-2009, 07:52 PM
  4. [SOLVED] Querying data in Business Contact Manager
    By NickNeedsHelp in forum Excel General
    Replies: 0
    Last Post: 07-28-2006, 04:40 PM
  5. [SOLVED] I have a small business would like to set up a contact base
    By boatman12 in forum Excel General
    Replies: 1
    Last Post: 05-09-2006, 06:20 PM

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