Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Stopping Validated Data from being Overwritten.

Stopping Validated Data from being Overwritten

Written by Allen Wyatt (last updated March 22, 2022)
This tip applies to Excel 97, 2000, 2002, and 2003


1

Melissa uses Data Validation regularly to limit what can be put into a cell. She notes that one flaw seems to be that it's always possible to overwrite the data by copying a cell from somewhere else in the file and pasting it into the cell that should be limited by Data Validation. Melissa wonders if there is any way to "lock down" the cells that have Data Validation, so no one can paste over them.

Melissa has discovered what some have called the "Achilles' heel" of Data Validation—you can paste over cell contents and thereby destroy whatever Data Validation rules were in the target cells. The only possible way around this is to use a macro to head off pasting into certain areas of the worksheet. A good way to do that is found at John Walkenbach's site:

http://www.j-walk.com/ss/excel/tips/tip98.htm

There are some limitations to the macros noted on that page, but there are some drawbacks that are not noted:

  • If a person doesn't enable macros when the workbook is opened, then the macro code can't do its job. (This is, honestly, a drawback to any macros for any purpose.)
  • The worksheet may seem a bit sluggish if the range of cells being protected is large, as the macro runs every time a change is made in the worksheet.
  • Because the macro runs every time the worksheet is changed, it effectively removes any possibility of having an "undo" feature in the worksheet. (Macros, when run, cannot be undone and clear the undo stack.)

Even with the drawbacks and limitations, this approach is probably the best way to overcome the potential problem.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (11798) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Stopping Validated Data from being Overwritten.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Changing the Color of Worksheet Gridlines

Want the gridlines in your worksheet to be a different color? You aren't limited to stodgy black; Excel lets you make ...

Discover More

Cleaning Text

You can use the CLEAN worksheet function to remove any non-printable characters from a cell. This can come in handy when ...

Discover More

Changing the Background Color for a Comment

Comments are a great way to document your worksheets. Excel provides you the tools you need in order to format your ...

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

More ExcelTips (menu)

Adding Pop-Up Documentation to a Cell

Want to have a small help screen pop up when a user selects a particular cell? This can be done by using data validation, ...

Discover More

Ensuring Unique Values in a Column

If you want to make sure that only unique values are entered in a particular column, you can use the data validation ...

Discover More

Handling Validation for Proper Latitude

When setting up Excel for data entry, you often have to be concerned with what values are acceptable. For example, if ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 6 + 5?

2017-09-16 04:57:35

Barry

Page now moved to: http://spreadsheetpage.com/index.php/tip/ensuring_that_data_validation_is_not_deleted/


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.