+ Reply to Thread
Results 1 to 7 of 7

How to adjust VBA code to create rule for a specific cell, rather than a whole column

  1. #1
    Registered User
    Join Date
    10-19-2015
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    3

    Lightbulb How to adjust VBA code to create rule for a specific cell, rather than a whole column

    Hi there,

    I am currently using a VBA code on numerous tabs of my spread sheet (that I sourced from online), which allows the Excel user to select multiple options from a drop-down list (in a specific column/s), so that each value they select is then separated by a comma. I am a teacher and we needed to enable users to select multiple student names from a data validation list, to receive particular awards. I now want to know how to adjust the code so that instead of making this applicable to any number of columns with these drop-down lists, I can select a single cell and its drop-down list. The reason for this need is because the other cells in the column only require one option to be selected, but this specific cell requires FOUR options. I have pasted the current code I use below, which applies to the whole column D (4). Could anyone please suggest how I change it to only apply to cell D9? Thank you!

    Please Login or Register  to view this content.
    Last edited by jlax87; 10-19-2015 at 09:25 PM.

  2. #2
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    365 Version 2409
    Posts
    2,789

    Re: How to adjust VBA code to create rule for a specific cell, rather than a whole column

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

  3. #3
    Registered User
    Join Date
    10-19-2015
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    3

    Re: How to adjust VBA code to create rule for a specific cell, rather than a whole column

    Cheers, didn't know. It is fixed now.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,196

    Re: How to adjust VBA code to create rule for a specific cell, rather than a whole column

    Please Login or Register  to view this content.
    becomes
    Please Login or Register  to view this content.
    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    365 Version 2409
    Posts
    2,789

    Re: How to adjust VBA code to create rule for a specific cell, rather than a whole column

    Thanks for the code tags.

  6. #6
    Registered User
    Join Date
    10-19-2015
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    3

    Re: How to adjust VBA code to create rule for a specific cell, rather than a whole column

    Thanks so much!

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,196

    Re: How to adjust VBA code to create rule for a specific cell, rather than a whole column

    You're welcome.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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] Adjust column width when specific cell value changes.
    By JO505 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-24-2015, 03:14 PM
  2. [SOLVED] Adjust Code to Sort by specific Cell characters found with cell
    By boldcode in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-15-2014, 02:34 PM
  3. create a button in excel with macros or VBA code in a specific cell targets.
    By Giri.hb in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 07-18-2014, 10:21 AM
  4. [SOLVED] Auto height adjust to a specific column only
    By alfgrey in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-10-2014, 08:32 AM
  5. creating rule to adjust fields..
    By Symbiot in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-01-2009, 04:28 PM
  6. If Cell is Empty create rule to Display the current Date
    By Sidewinder in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-05-2007, 04:12 PM
  7. Using Code to Adjust Specific Column Width
    By Nigel Bennett in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-09-2005, 03:06 AM

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