+ Reply to Thread
Results 1 to 5 of 5

Use text in one cell to fill in information in other cells in same row (ex. attached)

  1. #1
    Registered User
    Join Date
    08-15-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    4

    Use text in one cell to fill in information in other cells in same row (ex. attached)

    Hi,

    I have found a few threads that should work, but I can't figure out how to make it work for multiple values. I have eight members who are represented by an 8-letter code. There are about 500 rows of contact information for clients and the member code tells me who the client is associated with.

    I want to use this to create a merge document that includes the members' full name, title, email address and phone number for each client. I have created a table on the worksheet as follows:

    AMATTHEW BTHOMPSO CMCDONAL
    Allan Matthew Barb Thompson Colin McDonald
    Manager Senior Vice President President
    416-999-9990 416-293-2938 403-283-3827
    [email protected] [email protected] [email protected]

    I'd like a formula that would find the 8-letter code and fill in the information for columns EW_name, EW_title, EW_phone, EW_email in the same row.

    Any input would be much appreciated. Thanks!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Use text in one cell to fill in information in other cells in same row (ex. attached)

    First, i separated your data in Col X into separate columns.

    In Q2, dragged across and down.
    =HLOOKUP($A2,$X$4:$Z$8,COLUMN(B1),FALSE)
    See attachment.
    Is that what you are looking for?
    Attached Files Attached Files
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    08-15-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Use text in one cell to fill in information in other cells in same row (ex. attached)

    Quote Originally Posted by ChemistB View Post
    First, i separated your data in Col X into separate columns.

    In Q2, dragged across and down.
    =HLOOKUP($A2,$X$4:$Z$8,COLUMN(B1),FALSE)
    See attachment.
    Is that what you are looking for?
    Yes, that definitely gets me the result I want, but I don't understand how you got the "COLUMN(B1), FALSE" . I'm having trouble re-creating it in my spreadsheet. Maybe it's because I don't understand what you mean when you say, " separated data in Col X into separate columns". It looks exactly the same as the original when I opened the file.

    UPDATE: Okay, I did a little research and figured out that's the way to advance through the rows. It's working now exactly the way I need. Thanks so much for your help.
    Last edited by beenile; 04-04-2013 at 03:50 PM. Reason: UPDATE - solved

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Use text in one cell to fill in information in other cells in same row (ex. attached)

    In your original uploaded file, if you click on X4 (for example), you'll see that cell contains "AMATTHEW BTHOMPSO CMCDONAL". If you open up my spreadsheet, you'll see that x4 contains AMATTHEW, Y4 contains BTHOMSO, and Z4 contains CMCDONAL
    Is your data being imported from somewhere else?

    Here's a link that explains how HLOOKUP works
    http://www.techonthenet.com/excel/formulas/hlookup.php
    I used COLUMN(B1) instead of a constant like 2 so that when I copy a formula to the right, that value will change. Column(C1) = 3, COLUMN(D1) =4 and so on.
    Let me know if you still have questions after reading the link.

  5. #5
    Registered User
    Join Date
    08-15-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Use text in one cell to fill in information in other cells in same row (ex. attached)

    Hi ChemistB,

    Thanks for your reply. I hadn't realized that when I copied and pasted the data it all went into one cell. Thanks for explaining the "COLUMN" reference - the other examples I had looked at only used a constant.

    You've solved my issue and answered all my questions--saving me so much time. Thanks again!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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