+ Reply to Thread
Results 1 to 3 of 3

VBA validation allow users to only copy to a specified range

  1. #1
    Forum Contributor
    Join Date
    06-19-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Office365
    Posts
    273

    VBA validation allow users to only copy to a specified range

    Hello,

    I'm setting up a valuation model where each statement line item has a number of potential drivers for projection purpose. for example, revenue has "% of Growth from Prev. Year", "Scenario driven", "Volume Change" in the validation list. I need to set things up so that the validation rule only applies to say Range("J12: G20") as only these are related to revenue (COGS would have a different input range, for example). When a user select an item from the validation list and if he/she wants to copy it to the other input cells (so he/she doesn't have to click on the cell and pick a value twenty times), I need to add some codes to limit the copy paste only to range J12:G20 so that the user doesn't incidentally copy this to other statement line input ranges. How can I do this?

    just to clarify, this is different from not allowing pasting from another cell without drop-down in it. this is ALLOWING copy/paste but only to specified ranges or ranges with exactly the same drop-down values. I think this would be a change event after copy before paste (go check the cell selected for pasting, if it is outside of J12:G20, throw an error message and terminate the paste)

    is this doable?

    thanks so much
    Last edited by lynnsong986; 11-02-2019 at 11:22 AM.

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: VBA validation allow users to only copy to a specified range

    Hello lynnsong986,

    Please attach a sample workbook (not a picture or pasted copy). 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.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Contributor
    Join Date
    06-19-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Office365
    Posts
    273
    Quote Originally Posted by Winon View Post
    Hello lynnsong986,

    Please attach a sample workbook (not a picture or pasted copy). 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.
    Thanks for replying. I decided to go another route with it. I protected the sheet but allow macros to select the entire range with the same value from the drop down using me.protect user interface only= true.

    If this doesn’t work, I’ll attach a copy of the workbook.

+ 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] Loop through data validation list, copy and paste a range
    By snymanaj14 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-15-2019, 05:08 AM
  2. Replies: 7
    Last Post: 12-21-2016, 12:30 PM
  3. Programmatically add validation error. Previous users' posts haven't solved the problem.
    By kylecodesinBoston in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-06-2015, 09:13 AM
  4. [SOLVED] VBA or Data Validation to prompt/reminder users for possible action required
    By SVTF in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-13-2014, 01:38 PM
  5. [SOLVED] Data Validation in Shared workbook not visible to all users
    By JP Romano in forum Excel General
    Replies: 1
    Last Post: 07-02-2013, 11:51 AM
  6. How to prevent users overriding validation?
    By PeruvianSkies in forum Excel General
    Replies: 5
    Last Post: 04-03-2009, 01:14 PM
  7. Hide users in Data Validation
    By emussynski in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-03-2008, 12:44 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