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 Default Drive

Macros can be used to read and write all sorts of files. If those files are on a different drive than the current one, ...

Discover More

Adjusting Times for Time Zones

Collect a series of times in a worksheet, and you might need to adjust those times for various time zones. This involves ...

Discover More

Understanding the For ... Next Structure

Spend any time creating Word macros, and sooner or later you will need to repeat some of your programming code a certain ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (menu)

Changing Fonts in Data Validation Drop-Down Lists

The data validation capabilities of Excel allow you to easily create drop-down lists showing what data is acceptable for ...

Discover More

Limiting Input to a Format

When setting up a worksheet for others to use, you might want to make some limitations on what can be entered in certain ...

Discover More

Limiting Entries to Numeric Values

When creating a worksheet, you may need to limit what can be entered into a particular cell. Using data validation, you ...

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 - 0?

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.