+ Reply to Thread
Results 1 to 5 of 5

Using value in A1 to populate a value in A2

  1. #1
    Registered User
    Join Date
    12-17-2012
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    9

    Using value in A1 to populate a value in A2

    I have a wee quandry that I'm not too sure about;

    In cell A1, I have a drop-down list containing 4 names. Each of these names has a corresponding identification number, which I would like to have populated in cell A2, depending on which name is selected.

    For example: John Smith's number is 745, Joe Bloggs is 520 etc. If I select John Smith from the list in A1, I want 745 to appear in A2, and so on.

    Other points to note: The drop-down list may end up being up to 15 names long. All of the names and their corresponding numbers are listed in a seperate worksheet if needed.

    I thought I'd be able to use an IF statement for this, but now I'm not so sure! Is there an easy way to do this? Many thanks!

  2. #2
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Using value in A1 to populate a value in A2

    you could try vlookup
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  3. #3
    Registered User
    Join Date
    12-17-2012
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Using value in A1 to populate a value in A2

    Ahhh, didn't know about that one! Solved my issue perfectly thank you.

  4. #4
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Using value in A1 to populate a value in A2

    Welcome,
    regards,
    vladimir

  5. #5
    Registered User
    Join Date
    12-17-2012
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Using value in A1 to populate a value in A2

    Ok, so its not as solved as I first thought. The VLOOKUP works fine, until the auto-sorting macro I also have gets a hold of things (active when the worksheet is closed). After the sort has occurred, the VLOOKUP no longer works in the rows that have been sorted. Is there a way to prevent the formula going away once the sort has happened?

+ 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