+ Reply to Thread
Results 1 to 7 of 7

Search Column A and B for string match and return value of column C

  1. #1
    Forum Contributor
    Join Date
    01-21-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    258

    Search Column A and B for string match and return value of column C

    Good Morning Guys

    In a macro that creates automatic e-mails I'm trying to take someone's name and then search for that persons details on another sheet and if it finds them, then it will return their e-mail address.

    Here's where it gets slightly complicated. The persons name appears on sheet 'Transmittal Sheet' in Cell 'C12' and has their first name and last name in the same cell. When searching for them in sheet 'Contacts' Their first name is in column 'A' and their last name in column 'B' then their e-mail address is in column 'C'

    Can anyone help me write some code that will split the name up and search for it in the contacts sheets?

    Sorry this one is a pain in the bum, but I can't change the way the contacts sheet is set out.

    Many Thanks in advance! Rep for any help as always!

    R

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Search Column A and B for string match and return value of column C

    It would help to attach a file with some sample data. To attach a file, push the button with the paperclip (or scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button.

  3. #3
    Forum Contributor
    Join Date
    01-21-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    258

    Re: Search Column A and B for string match and return value of column C

    Will do bud,

    Give me two mins, I have to strip the file of all the confidential data :P

  4. #4
    Forum Contributor
    Join Date
    01-21-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    258

    Re: Search Column A and B for string match and return value of column C

    Right a brief explanation of how this thing works.

    PPU document Register - Enter Details then create sheet

    Contacts - You'll have to enter some test data in here

    Transmittal sheet - select data, document to send(data from PPU document register) & person(from contacts) to send it to.
    Print to PDF - logs details from the transmittal letter in the transmittal register and also in the sheet created from ppu document register.

    Also, for this workbook to work it should be in a folder called 'Document Control' which also has a sub folder called 'Document transmittals' which then has a folder in it called 'sent transmittals'

    Sorry if all this seems a bit confusing, its quite difficult to explain all the different macros on this sheet briefly without boring you with my job!

    MDR - SAMPLE.xlsm

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Search Column A and B for string match and return value of column C

    Sorry your data in your sample is running me out of memory? I'm sure someone will be able to help you.

  6. #6
    Forum Contributor
    Join Date
    01-21-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    258

    Re: Search Column A and B for string match and return value of column C

    No worries J.D. Bump for any other help?

  7. #7
    Forum Contributor
    Join Date
    01-21-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    258

    Re: Search Column A and B for string match and return value of column C

    I've decided to pursue a different means of tackling what I'm doing, so I'm marking this thread as solved.

+ 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. Match string in one column, return value in same row, skip rows that down't match
    By anilsen0711 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-01-2013, 05:35 AM
  2. Search column for string and return every row with that string in new sheet
    By myers601 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-03-2012, 06:02 PM
  3. Replies: 1
    Last Post: 07-26-2011, 06:48 AM
  4. Replies: 7
    Last Post: 07-17-2011, 09:49 AM
  5. [SOLVED] URGENT -- search in string for a value in another column, if found, return value from next column
    By samkshah in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-03-2005, 12:05 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