+ Reply to Thread
Results 1 to 12 of 12

Dropdown list selection from column 1 but puts in value from column 2

  1. #1
    Forum Contributor
    Join Date
    12-16-2015
    Location
    Southern Cali
    MS-Off Ver
    2013
    Posts
    104

    Dropdown list selection from column 1 but puts in value from column 2

    Hello,

    Here is what I am trying to do:

    Look up sheet

    Column 1
    External Mandate
    Internal Mandate
    Not Mandated

    Column 2
    100
    10
    1

    I have a dropdown menu setup on data sheet with the following:

    Column 1
    Drop down menu

    Column 2
    VLOOKUP that bring in the data from column 2 based on the selection of column 1 from the look up sheet.

    However, this is two columns. I want it to be one column. User selects from drop down menu, "External Mandate", I would like the same cell to show the 100 instead of the name.

    How would I go about doing this?
    Last edited by rhett7660; 07-28-2016 at 01:46 PM. Reason: Not solved

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Dropdown list selection from column 1 but puts in value from column 2

    Please refer to attached file.

    Make a named range called "rangeVal" for Sheet2!A1:B7

    Code on Sheet1 :
    Please Login or Register  to view this content.
    Code on Module1 :
    Please Login or Register  to view this content.
    Attached Files Attached Files
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  3. #3
    Forum Contributor
    Join Date
    12-16-2015
    Location
    Southern Cali
    MS-Off Ver
    2013
    Posts
    104

    Re: Dropdown list selection from column 1 but puts in value from column 2

    Thank you very much! Will try this out and let you know!

  4. #4
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Dropdown list selection from column 1 but puts in value from column 2

    You are welcome, and thanks for the rep.points.
    Don't forget to mark this thread as solved :
    please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  5. #5
    Forum Contributor
    Join Date
    12-16-2015
    Location
    Southern Cali
    MS-Off Ver
    2013
    Posts
    104

    Re: Dropdown list selection from column 1 but puts in value from column 2

    Ok, I was able to get this to work, however, how do I carry it down the entire column? I see there is a MEO that calls the one cell C7, however, how do I get it so that it covers the entire column?

    For me it is Q7 to....

    Thanks

  6. #6
    Forum Contributor
    Join Date
    12-16-2015
    Location
    Southern Cali
    MS-Off Ver
    2013
    Posts
    104

    Re: Dropdown list selection from column 1 but puts in value from column 2

    ok, the column update did not work. So I am still stuck with applying the above to entire column not just one cell.
    Last edited by rhett7660; 07-28-2016 at 01:21 PM.

  7. #7
    Forum Contributor
    Join Date
    12-16-2015
    Location
    Southern Cali
    MS-Off Ver
    2013
    Posts
    104

    Re: Dropdown list selection from column 1 but puts in value from column 2

    Also, if I have say seven (7) different looks up, would I have to create seven (7) different EventEnabler and ValidateLookup scripts?

  8. #8
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Dropdown list selection from column 1 but puts in value from column 2

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  9. #9
    Forum Contributor
    Join Date
    12-16-2015
    Location
    Southern Cali
    MS-Off Ver
    2013
    Posts
    104

    Re: Dropdown list selection from column 1 but puts in value from column 2

    Quote Originally Posted by karedog View Post
    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    And attached....
    Attached Files Attached Files

  10. #10
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Dropdown list selection from column 1 but puts in value from column 2

    I think there is better way to achieve your goal. Instead of replacing validation string with numbers (which make it difficult to verify what you have already input on the cell), it is better using an UDF that sum the row's values based on vlookup values, this way the validation string is unchanged.

    -------------------------------

    For learning purpose, here is the way using original method (replace validation string with associated number) :
    1) Create named range as much as validation data (in this case : vldB, vldC, vldE, vldF, vldG, vldH, vldI, vldJ)
    2) Assign this named range as validation list criteria for each cell, for example for cells on column B, the validation list formula is =INDEX(vldB,0,1)
    3) Put this code on Sheet "Project" :
    Please Login or Register  to view this content.
    4) Put this code on Module1 :
    Please Login or Register  to view this content.
    -------------------------------

    Now, using UDF method :
    1 and 2) Same as first and second steps above
    3) Put this code on Module1 :
    Please Login or Register  to view this content.
    4) Put this formula on cell K7 (and copied down) :
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    12-16-2015
    Location
    Southern Cali
    MS-Off Ver
    2013
    Posts
    104

    Re: Dropdown list selection from column 1 but puts in value from column 2

    Wow...!

    Thank you for the explanation and examples! The system won't allow me to add to your Reputation or I would. Thank you very very much!!!!!!!!!!

  12. #12
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Dropdown list selection from column 1 but puts in value from column 2

    You are welcome, glad to help.


    Regards

+ 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. [SOLVED] Dropdown list with password for a whole column
    By pol04 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-29-2015, 07:53 PM
  2. [SOLVED] Populate column based on selection from a dropdown
    By dbwaste04 in forum Excel General
    Replies: 5
    Last Post: 11-01-2014, 04:23 PM
  3. Autopopulate multiple columns based on dropdown selection in far left column
    By tinaascoggins in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-02-2014, 12:29 PM
  4. Replies: 1
    Last Post: 07-03-2013, 10:50 AM
  5. [SOLVED] DropDown list of Column A based on Column B of a table
    By aarunb88 in forum Excel General
    Replies: 5
    Last Post: 07-03-2013, 05:11 AM
  6. Cull dropdown list options based on selection in another dropdown
    By Kiffar in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-20-2012, 01:53 AM
  7. Sort column by dropdown list
    By 2001jesper in forum Excel General
    Replies: 1
    Last Post: 11-06-2012, 01:46 PM

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