+ Reply to Thread
Results 1 to 5 of 5

Creating a new table from a reference table

  1. #1
    Registered User
    Join Date
    12-17-2013
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    6

    Creating a new table from a reference table

    I'm looking for a more elegant solution to my problem and I'm too new to excel to figure out the best way to fix it. I'd like to create table which is a subset of entries from a reference table based on whether the name is found within the text of a particular cell.

    For example, I have a reference table of potential participants (Jake, Mark, Elizabeth, Hope, Abigail, Jose, etc.). In my reference table, each participant's name is listed in Column A, and Columns B, C, and D have information that pertains to that participant (age, height, weight). I receive an email which include several names from the list of potential of participants (Mark, Abigail, and Jose). I want to be able to copy the text of that email into a cell (or into a word doc if that works better) and have Excel create a table based on the names found in that email and include all of the corresponding information (age, height, weight) found in the reference table. So, in the end I would have a table with Mark, Abigail, and Jose's information.

    In my case, there are many potential participants and the email that I receive is pretty large so the resulting reference table may have 100 entries and the resulting table may have 20 entries. I hope this makes sense and I characterized the problem appropriately and used the proper terminology. I'm sure that the resulting formulas will use VLOOKUP, but I'm just not sure how to get the information from the email.

    Thank you for your help!

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Creating a new table from a reference table

    This task is very well served by simple VLOOKUP function in excel

    so if you list in A1, A2, A3 your "selected names" then in B1 you can write:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and copy it right and down

    edit - I somehow focused on first part of question - were you editing the thread? to take list of names form outlook you can either use macro (probably will not be easy one) or (assuming names in a list are just comma separated) do few steps:
    * copy all names from outlookm into single excel cell
    * use text to columns, separated by coma (and possibly space)
    * copy all names (now in several cells in a row) and paste special transposed
    * now use VLOOKUP

    It's just few seconds to execute manually once you know how-to.
    Last edited by Kaper; 07-09-2015 at 11:27 AM.
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    12-17-2013
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Creating a new table from a reference table

    Kaper, Thank you for responding so quickly! I think that my main problem is retrieving the names from the email. The email is very long and the names are randomly spread throughout. I currently have a table set up with all potential names in Column A, and Column B has a formula that outputs "Yes" if the name in Column A is found in the email [=IF(AND(A2<>"",ISNUMBER(SEARCH(A2,A87))),"Yes","")]. The email is copied into cell A87. The remaining columns have the IF "YES" then VLOOKUP function [=IF(B2="Yes",VLOOKUP(A2,Sheet1!$A:$Y,3,FALSE),"")]. Sheet1 has my reference table. This results in what I need but it has a lot of blank rows. I guess I really just need help transforming the names found randomly in the large email into a list in Column A, then I can use VLOOKUP for the rest. Thanks again for helping me think through this.

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Creating a new table from a reference table

    So if your "dictionary of names to search" is in A2:A86 and mail text is in A87 you can write in B2 such array formula*
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and copy it down or to have it just ready and copuied too much down add one more iferror:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Now you have your data for VLOOKUP listed elegant way in consequtive rows :-)

    *)...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

  5. #5
    Registered User
    Join Date
    12-17-2013
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Creating a new table from a reference table

    Dziękuję, Kaper! That works great!

+ 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: 2
    Last Post: 08-27-2014, 03:13 PM
  2. Replies: 9
    Last Post: 02-26-2014, 04:17 PM
  3. Help creating vba function to move data from table to table on if condtion
    By damaple in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-09-2013, 05:42 AM
  4. Replies: 0
    Last Post: 08-09-2013, 12:32 PM
  5. [SOLVED] VBA Code for a pivot table to open database and to reference table current page
    By Pete Straman Straman via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-21-2005, 12:06 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