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

Stopping Validated Data from being Overwritten

by Allen Wyatt
(last updated February 18, 2017)


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:

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 (11799) applies to Microsoft Excel 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Excel 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. ...


Copying Paragraph Formatting with the Mouse

When you get one paragraph formatted just the way you want, you might want to copy that formatting so it can be applied ...

Discover More

Using TC Fields for Notes

The TC field is normally used in constructing manual Tables of Contents. The way the field works, however, makes it a ...

Discover More

Specifying Sub-entries in an AutoMark File

An AutoMark file allows you to quickly and easily create an index from a document. This can be a great boon for large ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (ribbon)

Specifying a Data Validation Error Message

Data validation is a great tool for limiting what can be input into a cell. Excel allows you to specify what should ...

Discover More

Making a Drop-Down List Indicator Visible

Data validation allows you to create drop-down lists that aid data entry. If you want the indicator for the drop-down ...

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

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

View most recent newsletter.


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}] 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 + 2?

2017-02-19 14:26:07

Alec Whatmough

I do the same as riaz, but make the sheets Very Hidden to prevent users from opening it with macros disabled and simply unhiding sheets (no, I don't understand why they do it either..)

2016-08-26 05:17:49


To force the user to allow macros to run, I hid all the tabs except one which I call "Welcome", which just has a message that the workbook needs macros enabled to run.

Once macros are enabled, the "Welcome" tab is hidden and all the other tabs are revealed. On closing, all the tabs are hidden and "Welcome" is unhidden again.

Thus, at each opening, macro enabling is forced, or the workbook remains inaccessible.

2016-02-23 09:58:51


this seems too work for copying from inside and outside the workbook - without using macros.

put in validation using a list in the normal way. (keep the cells locked) Assume this is in the range E5:E11

merge each cell with the one beside it (i.e. merge E5 with F5 etc) for the whole range (keep these cells locked as well).

then go to the review tab::changes::allow users to edit range

select the left most range only - e.g. E5:E11,
protect the sheet in the normal way and it should work - any comments?

2015-11-03 18:47:22

game writer guy

I just posted about how to fix the overwrite problem without VBA over at

My question is related: now that we can smoothly preserve the validation, how do you get Excel to perform validation on pasted data instead of sitting on its hands?

2015-06-18 07:03:26


Way easier solution, supposing the validated data is a list: insert a dropdown list Object, available in the Developper tab.

Then tie its value to a cell hidden somewhere, and tadah! You can use the listed value in a cell formula.

No need to use Event macros when it can be avoided.

In case it's a boolean, use a Checkbox.

2014-05-30 06:28:20

Tony King

This function works perfectly for data that is copied from the active workbook. However it does not work when data is copied and pasted from another workbook.
Can this be added?

2012-12-21 10:44:51


The recommended code just loops and returns the error message an unending number of times when just one cell has a copy/paste entered that overwrites/invalidates the Data Validation rule. The only way to stop the endless errors is <Ctrl> <Break>

This Site

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

Newest Tips

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.