Defined name gets moved with cut and paste

TomM

New Member
Joined
Dec 17, 2010
Messages
8
Using Excel 2007 under WinXP, I am trying to prevent defined names from getting moved when the user performs a cut and paste from one cell to another.

My worksheet is a data entry form wherein all cells are locked except for the cells where you enter data. Each one of these data cells has a defined name associated with it.

If a user accidentally enters data into the wrong cell, and then executes a cut/paste to correct things, the worksheet is corrupted.

One possibility is to turn off the ability to "cut". Any suggestions for a cleaner solution?

Thanks,
Tom
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Welcome to the MrExcel board!

See if defining your named range(s) in the 'Refers to:' box like this is any help.

=INDIRECT("Sheet1!A1")
 
Upvote 0
If I understand the INDIRECT function, it will not help me. I am using Excel as, basically, a data entry form.

If I put a function (such as INDIRECT) in a cell, that would prevent the defined name from being wiped out, but the name's association with the correct cell (via INDIRECT) would be wiped out.

Please correct me if I am missing something.

Thanks,
Tom
 
Upvote 0
If I put a function (such as INDIRECT) in a cell, ..
I am not suggesting putting INDIRECT in a cell, I am suggesting using it to define your name. Try these steps in a new workbook.

1. In cell A1 put a 2

2. Formulas ribbon tab|Define name|Name: Test |Refers to: =INDIRECT("A1")|OK

3. In cell D1 put the formula
=Test
At this point D1 should show 2, since the named range Test is pointing to cell A1

3. Cut cell A1 and Paste it somewhere else.
At this point D1 should show 0 (because the named range 'Test' is still pointing to cell A1 which is now blank)

4. Now put a 3 in cell A1
Cell D1 should now show 3, again showing that the named range was not moved by the Cut/Paste
 
Upvote 0
Yes, Peter, that *does* work.

I don't yet understand INDIRECT when it uses quoted cell refs {INDIRECT("A1")}, but that simply means I need to spend some more time with it.

Thank you for your spot-on help.
 
Upvote 0

Forum statistics

Threads
1,215,061
Messages
6,122,922
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top