+ Reply to Thread
Results 1 to 9 of 9

if then? or not?

  1. #1
    Registered User
    Join Date
    06-12-2015
    Location
    Madison WI
    MS-Off Ver
    2010
    Posts
    52

    if then? or not?

    I have a list of companies on a worksheet, and in a column next to that list is the contact person.
    On another worksheet, I have a drop down box that allows me to select from the list of companies referenced above.
    In a box below the drop down box, I would like it to populate the contact person associated with the company being selected from the list in the box above.
    I've tried if then, if then, if then, if then, but it's so many if then's, that Excel is not accepting it, or I'm not smarter than the software. Either way, I know there is a way that is much easier and doesn't require so many if thens.

    Can you help me?
    Thank you in advance for your time!
    -tommy

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,843

    Re: if then? or not?

    You want to use VLOOKUP. Details are available in Excel Help. If the companies are in Sheet1 in column A and contacts are in B, and your dropdown is in A1 of the other sheet, use this formula

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    06-12-2015
    Location
    Madison WI
    MS-Off Ver
    2010
    Posts
    52

    Re: if then? or not?

    Thank you Jeff! i literally copied and pasted your formula only changing the boxes that apply in my spreadsheet as follows: =VLOOKUP(E53,Lists!A2:B,2,FALSE) and it populates the following: #NAME?

    E53 is the box with the drop down list of companies from the lists worksheet - Lists!A2<

    E55 if the box I'm trying to get to populate the contact names from the lists worksheet - Lists!B2<

    ....to clarify the structure of the company list and the contacts to the right. Lists!A2< is the column that has the companies, and Lists!B2< is the column that has the contact (A1 & B1 on the lists sheet are the title of the columns and are not included or needed in the list).

    sorry if what i did wrong is obvious.

    THANKS SO MUCH FOR YOUR HELP! THIS IS EXCITING!
    Last edited by tommystanek; 06-12-2015 at 04:44 PM.

  4. #4
    Registered User
    Join Date
    08-17-2012
    Location
    New York, New York
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: if then? or not?

    Try removing the '2' after the 'A' in your formula. It should just be 'A:B'

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,508

    Re: if then? or not?

    do you really mean ....

    =vlookup(E53,Lists!A:B,2,FALSE)

    Look for E53 in column A and return corresponding value from B

  6. #6
    Registered User
    Join Date
    06-12-2015
    Location
    Madison WI
    MS-Off Ver
    2010
    Posts
    52

    Re: if then? or not?

    ROCK ON YOU GUYS! TOTALLY WORKED! THANK YOU SO MUCH! ...i still don't understand the formula, and couldn't have figured that out with you! God Bless you!

  7. #7
    Registered User
    Join Date
    08-17-2012
    Location
    New York, New York
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: if then? or not?

    No problem! Remember to add to our reputation if you found our suggestions helpful by clicking the little star below our posts. Have a great weekend!

  8. #8
    Registered User
    Join Date
    06-12-2015
    Location
    Madison WI
    MS-Off Ver
    2010
    Posts
    52

    Re: if then? or not?

    now i feel like I'm asking to much, is there any way to get the box in that has my drop down list to maintain the same formating as it is in the list itself?
    To be specific, my each line item in my list includes three lines as follows:
    Company Name
    Street Address
    City, State, & Zip

    When I select one of the companies from the list, it may populate a company as follows:
    Company Name
    Street Address, City
    State, & Zip

    Obviously I would like it to retain the structure as required by the post office, more for just professionalism.

  9. #9
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,843

    Re: if then? or not?

    This sounds like a totally different question, but we can look at it. You're not asking too much but I'm not clear on what you need to do. It would help immensely if you attach your file, removing any private data. Even without actual data we'll be able to see how your sheets are organized. Please point out where this can be found: "each line item in my list includes three lines as follows" and this: "it may populate a company as follows"

    I'm sure that the solution will be pretty simple, you're not the first person who ever had to develop a mailing list. It's just that I'm not clear on your question.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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