+ Reply to Thread
Results 1 to 8 of 8

Drop Down List that pulls different text

  1. #1
    Registered User
    Join Date
    05-07-2018
    Location
    Durham
    MS-Off Ver
    2013
    Posts
    3

    Drop Down List that pulls different text

    I'm trying to have a drop down list where I select the word from the list and it populates the definition of the work in cell. So I would use the drop down to select Team Work and in the cell it would say, "works well with others, etc"


    I'm using the following code and getting an error.

    Cells 90,91,92 are the cells I want to use the drop box in. Does anyone have an idea who I can make this happen? Thank you!

    :

    Private Sub Worksheet_Change(ByVal Target As Range)
    selectedNa = Target.Value

    If Target.Column = 3 Then
    If Target.Row = 90 Or Target.Row = 91 Or Target.Row = 92 Then
    selectedNa = Application.VLookUp(selectedNa, Worksheets("KEY").Range("behavior"), 2, False)
    If Not IsError(selectedNa) Then
    Target.Value = selectedNa
    End If
    End If
    End If
    End Sub

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Drop Down List that pulls different text

    What error are you getting?

    Any chance you could upload a sample workbook?

    Click on GO ADVANCED, scroll down and click Manage Attachments.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    05-07-2018
    Location
    Durham
    MS-Off Ver
    2013
    Posts
    3

    Re: Drop Down List that pulls different text

    I've attached the file I'm working on as it has no sensitive information. It's the Performance Review Tab and I have the code I used in there. Now I'm not getting an error but it's not working either. Thank you for the assistance.
    Attached Files Attached Files

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Drop Down List that pulls different text

    When I select from the data validation drop downs in C90:C92 the code does appear to work.

    For example if I select Reading it's replace with Reading: Understanding written sentences and paragraphs in work related documents.

  5. #5
    Registered User
    Join Date
    05-07-2018
    Location
    Durham
    MS-Off Ver
    2013
    Posts
    3

    Re: Drop Down List that pulls different text

    Maybe it's just on my computer it's not working. Perhaps I don't have anything enabled. But thank you! I'm glad to know it works! I'm new at this so I thought it wasn't working.

  6. #6
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Drop Down List that pulls different text

    to avoid error messages

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-13-2020
    Location
    California
    MS-Off Ver
    2016
    Posts
    1

    Re: Drop Down List that pulls different text

    Hi,
    I have a similar problem.. I am using the following code which is working for one of my drop-down lists, and pulls in column 2 of the named range.
    Private Sub Worksheet_Change(ByVal Target As Range)
    'Updateby Extendoffice
    selectedNa = Target.Value
    If Target.Column = 26 Then
    selectedNum = Application.VLookup(selectedNa, Sheet2.Range("Headquarter"), 2, False)
    If Not IsError(selectedNum) Then
    Target.Value = selectedNum
    End If
    End If
    End Sub

    However, my issue is that I need to do the same function for several other columns and named ranges, and I can't figure out how to nest or add additional
    functions,because each time I do, I get an error, and it locks up. All of my named ranges are in Sheet2, and an example of my additional named ranges and
    columns are Column 28 with named range "CurrencyCode", and column 30 with named range "survey", and column 33 with named range "Industry". There are several
    more, but this is an example. Can anyone help me with the proper way to have this code for different columns in the same sheet? PLEASE HELP!

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,570

    Re: Drop Down List that pulls different text

    Administrative Note:

    Hello rosafarinha and Welcome to Excel Forum.

    We are happy to attempt to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread

    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. Create new sheets with a string containing a Variable that pulls from a list
    By seanomuiri in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-30-2018, 11:35 AM
  2. Replies: 3
    Last Post: 08-29-2014, 10:44 AM
  3. [SOLVED] Drop down pulls string value (paragraph) and is concatenated.
    By AM949 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-06-2014, 11:02 PM
  4. Replies: 3
    Last Post: 01-08-2013, 02:08 PM
  5. Replies: 0
    Last Post: 03-18-2012, 11:53 AM
  6. Replies: 2
    Last Post: 10-07-2009, 12:32 PM

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