+ Reply to Thread
Results 1 to 4 of 4

Data validation - copy/paste problem

  1. #1
    Registered User
    Join Date
    04-07-2014
    Location
    Berkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    52

    Data validation - copy/paste problem

    Hello all

    I want to prevent copying and pasting over cells with data validation as this means the validation is overwritten. To get around this I've selected all the cells with data validation and unlocked them, then protected the worksheet with all boxes ticked apart from format cells, columns and rows.

    This prevents copy/pasting from overwriting data validation but it doesn't prevent data being pasted in that doesn't meet the validation criteria.

    So for example, say -1 is in cell A1, with no data validation. In B1 there is data validation, which doesn't allow negative numbers to be entered. If I copy and paste A1 into B1, the data validation isn't overwritten, but it doesn't stop the non validated data (-1) from being entered! If I then double click on B1 and press enter it recognises the validation criteria is not met.

    This workbook will be shared, if that makes any difference.

    Thanks

  2. #2
    Registered User
    Join Date
    04-07-2014
    Location
    Berkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Data validation - copy/paste problem

    bump...anyone?

  3. #3
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Data validation - copy/paste problem

    What do you want it to do if it's outside range? Stop the copypaste operation? My gut feeling is that's going to be hard; you're interfering with the clipboard, not with excel. You might be able to do it with VBA but I don't think it would be very robust.

    My advice is, either validate with a helper column that will throw an error if it's data outside range, or add conditional formatting to alarm cells that are outside range (or both).

    That way people can copy-paste the data in without any problems, but the spreadsheet can still validate.

  4. #4
    Registered User
    Join Date
    04-07-2014
    Location
    Berkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Data validation - copy/paste problem

    Hi Ben

    Thanks for the reply. I want to stop the copypaste operation, yes.

    The thing is, I've got a lot of columns, each with different validation. So I suppose I'd need one of these helper columns for each column that I have validation in?

    I can see that getting quite messy..

+ 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. validation rules not working when someone copy paste data on validation cell
    By jthakrar in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-17-2010, 03:36 AM
  2. VBA for data validation on copy / paste
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-07-2010, 03:40 AM
  3. [SOLVED] data validation and copy/paste.......
    By MPR in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-27-2006, 10:25 AM
  4. Replies: 3
    Last Post: 12-09-2005, 01:20 PM
  5. Replies: 1
    Last Post: 09-15-2005, 04:31 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