How can I stop format change when copying data into unlocked cells

How can I stop the format changing when I copy data into an unlocked cell in 
a format protected worksheet?

I need to allow people to both enter data or copy data from another source 
into cells so I have unlocked these cells but also don't want the format of 
the cells to be changed.  If you enter data directly the format does not 
change but if you copy and paste data it changes the format.

I know you can use "copy paste special values" but would like to know if 
there is some system way of doing this.
0
Utf
2/11/2010 5:35:01 AM
excel.worksheet.functions 4936 articles. 2 followers. Follow

1 Replies
3772 Views

Similar Articles

[PageSpeed] 47

Copy/paste this into the sheet module.

Right-click on sheet tab and "View Code" to open the module.

Private Sub Worksheet_Change(ByVal Target As Range)
    Dim myValue
    With Application
        .EnableEvents = False
        myValue = Target.Formula
        .Undo
        Target.Formula = myValue
        .EnableEvents = True
    End With
    Application.CutCopyMode = False
End Sub


Gord Dibben  MS Excel MVP


On Wed, 10 Feb 2010 21:35:01 -0800, Linty <Linty@discussions.microsoft.com>
wrote:

>How can I stop the format changing when I copy data into an unlocked cell in 
>a format protected worksheet?
>
>I need to allow people to both enter data or copy data from another source 
>into cells so I have unlocked these cells but also don't want the format of 
>the cells to be changed.  If you enter data directly the format does not 
>change but if you copy and paste data it changes the format.
>
>I know you can use "copy paste special values" but would like to know if 
>there is some system way of doing this.

0
Gord
2/11/2010 4:55:16 PM
Reply:

Similar Artilces:

blank cell instead of x
I need a formula to have a blank cell instead of a "x" eg: result should be: aa ab ac ad ae af ag ah ai aj ak al am an ao 2 6 3 6 2 5 17 20 15 205 18 6 3 6 2x 5 3 1 5 7 19 12 133 1 5 7x the formula i used is: =IF(AF2>=42,AA2&""&"x",IF(AF2="","",AA2)) on row 3 there are blank cells (null string contains formulas ) when I apply the formu...

Stop My Documents from opening all the time?
Is there anyway to stop My Documents from opening everytimg I start a Windows Explorer session? I guess there's no future in trying to delete it, because so many products try to put stuff there. Right? Laurel wrote: > Is there anyway to stop My Documents from opening everytimg I start a > Windows Explorer session? > If you want Explorer to open somewhere else, simply modify the properties of the shortcut you're using to open it. All you need do is create/modify the target field of your Windows Explorer shortcut to point where you want it. Co...

conditional formatting sort
Is there a way to sort after conditional formatting. So, if I've set up a conditional format to color my text red if the number is between 0 and 95, then I want to sort so all red numbers are at the top of the spreadsheet? Any ideas? Thanks for your time and assistance. Roberta On Thu, 25 Oct 2007 05:08:00 -0700, rrupp <rrupp@discussions.microsoft.com> wrote: You can't sort by color, but you can add a column to your query like this: SortColumn: Iif(SomeValue >= 0 and SomeValue <= 95, 1, 2) Then sort by this column. -Tom. >Is there a way to sort after condition...

Using Relative path for XML data file?
Is there a way to specify a relative path to an XML data file imported into Excel 2003? I am writing a web app that generates report data as XML for the user to download to their local machine. This data is to be consumed by an Excel reporting spreadsheet, which contains display-formatted tables and charts that are mapped to various data fields in an XML Map, which is in turn linked to the xml data file they will download. The idea is the user only needs to download the data for updates, not the whole spreadsheet. However, since I cannot predict the path where the user will store their...

Changing Cells and entering data in them
Thanks for the help again. Big thanks to Steve you've got me this far. I went out and bought a book, but it's like reading a foreign language. I was informed today that I can't have message boxes come up. I need to have the code point at the cells and if they are blank turn which ever one is blank red or if both are then both turn red then pause for each cell to be filled in. Cell F14 "Last Name" then automatically go to Cell F16 "First Name" on tab or enter. Basically if Cell F22 or F23 has an X in it, Cells F14 an F16 turn red and cell F14 has the focus...

Blue screen crash Stop: 0x0000008E
Whenever im playing a game, or surfing the internet, every once in awhile(pretty recent now) my computer will totally freeze up and i get the blue screen with that error code on it. it tells me to restart if this is the first time or contact an administer. I've gone to microsoft updates and fully updated everything i could, what else could possibly be causing this? CodyE wrote: > Whenever im playing a game, or surfing the internet, every once in > awhile(pretty recent now) my computer will totally freeze up and i get the > blue screen with that error code on it. it ...

Is anyone an expert with outlook that I can call on the phone?
How do I share calenders between outlook and my MSN Premier account? Assuming you are using the outlook connector, you need to set the msn account to be the default message store then outlook will use the msn calendar as the default. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com Outlook Tips by email: mailto:dailytips-subscribe-request@lists.outlooktips.net EMO - a weekly newsletter about Outlook and Exchange: mailto:EMO-NEWSLETTER-SUBSCRIBE-REQUEST@PEACH.EASE.LSOFT.COM You can access this...

Change position ID in HR
We would like to change the position ID in human resources. Does anyone have a suggestion on this. You would need to do it behind the scenes using a tool like Query Analyzer. -- Charles Allen, MVP "KT" wrote: > We would like to change the position ID in human resources. Does anyone have > a suggestion on this. careful though when you change it on the background as you need to know all the tables that use this position ID or Position Code and change it there too otherwise all the link would be gone and you end up with orphan records that its just the same as creatin...

data sort
ok now should be simple >> I need to sort by month on data that is held in format >> day/month so eg 1511 1510 3011 3010 now custom/ends with/ 11... does not work custom/ends with/ ??11.. or *11 does not work either contains 11 does not work (& would also be wrong if data set contained 1011) but still I am stumped so any help would be great cheers Alex I would be inclined to add a new, temporary field of formulas that pull off the right 2 digits, and sort by that: =RIGHT(A1,2) -- Jim Rech Excel MVP ...

Show date, time & day of week in one cell
Can I show the date, time and day of week in one cell. I have: 09/03/07 8:30 AM in one cell using the format (Format/Cells/Custom): [$-409]mm/dd/yy h:mm AM/PM;@ Excel refuses to accept ddd for Mon or dddd Monday at the end of the format I want it to read: 09/03/07 8:30 AM Monday in 1 cell. I have Excel 2003. One way: mm/dd/yy h:mm AM/PM dddd;@ In article <Xns99B8A3CAF9130pencilunlistedcom@208.49.82.220>, Burp <burp@beep.comINVALID> wrote: > Can I show the date, time and day of week in one cell. > > I have: > 09/03/07 8:30 AM > in one cell using the for...

Pulling data from separate tabs
When charting in Excel 2002 is there a way to use sets of data from two different tabs within the same worksheet? For example, a spreadsheet contains separate tabs for prior year and current year data. Is there a way to reference the data or label series to pick up data from both? I tried pointing and clicking, and then typing the following as a reference for the axis labels: ='Prior Year'!$B$110:$M$110,'Current Year'!'$B$110:$M$110 but receive an error that I'm referring to an external worksheet. I've used the comma (') in the past to reference breaks ...

default values in a cell
Hello, can you help me please Cell B1 contains a complex mathematical formula which requires (in several places) a number from cell A1. Cell A1 can contain any integer number, but it is usually the same (30). I would like to be able to leave cell A1 empty, and only enter a number when it is not 30 , ie the default value of A1 is 30, unless specified. How do I go about this ? Should I look at conditional formatting, or put lots of IF functions into an already complex formula? Thank as always KK Use 2 cells Modify the complex formula to use B1 rather than A1 ( or any other un-u...

Stop Outlook from starting up automatically
Once I installed Outlook2003, it now runs automatically on startup. How do I disable this? -- | +-- Julian | are you using a PDA that is trying to access the data in it? If so, make sure the device is not connected when you boot. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Author, Google and Other Search Engines (Visual QuickStart Guide) Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com Subscribe to Exchange Messaging Outlook ne...

Business Portal Development
All: I know how to use Rational XDE, VS and the BP SDK to create new entities in BP, but how does one go about chaning labels? For example, if I wanted to change two labels on a requisition mgt screen: Can I just crack open the ASPX page and change the caption property? Thanks, Dwight -- Hi, To edit the lables you can use front page server extensions 2003. "Dwight Specht" wrote: > All: > > I know how to use Rational XDE, VS and the BP SDK to create new entities in > BP, but how does one go about chaning labels? > > For example, if I wanted to ch...

Fixing a formula to read a general format?
A few months ago I had asked a question and got this answer: Question: I have a a set of values in A1 through A100. I need to look up each value and find a match in another set of values located in C1 through C200. If a match is found then I need the formula located in column B to return the value in the same row but the next column over (D). Answer: =IF(ISNUMBER(VLOOKUP(A1,$C$1:$D$200,2,0)), VLOOKUP(A1,$C$1:$D$200,2,0), "") Copy down through A100. The formula worked fine, however the reference value and the look up value are not any more numbers but a combinatio...

How do you change the APR?
How do you change the APR in a Credit Card account? Like if you have to change it from 13.250% to 14.240% Depends on the version but (in M2007) go to the CC Account and click on Change Account Settings. Scroll down to Credit Information and click on Change Credit Details. If you want to change the Minimum payment rate/amount as well, click on the Minimum payment amount and a side window opens. -- Regards Bob Peel, Microsoft MVP - Money For UK tips & fixes see http://support.microsoft.com/default.aspx?scid=fh;EN-GB;mny. I do not respond to any emails that I have not specifically ...

Call & Place Graphic Based on Cell Value?
Is there any way to call & place a graphic image based upon a cell value? Maybe you can look at J.E. McGimpsey's page: http://www.mcgimpsey.com/excel/lookuppics.html documike wrote: > > Is there any way to call & place a graphic image based upon a cell value? -- Dave Peterson ...

After editing example1.xls and click SAVE, the filename changes to AABBEE.xls
After editing example1.xls and click SAVE, the filename changes to AABBEE.xls. The original file still exist and has been updated but the 'funny' filename also have the same content, and editable. The example1.xls is stored in a server and accessed by many people within the company. Everyone accessing to the file will change the filename unknowingly after saving it. ...

predict future data
Is there a way to create an XY line graph wih plotted data, yet leave room to predict future data on the axes? I can get the graph, but the x and y axes stop at the last data points, and I want those axes continued so that the existing data can be examined and future data predicted and plotted on the same graph, but I am not sure how to accomplish this. Any suggestions would be appreciated. Thanks. Jeff 1) Click on data series in chart, use Add trendline; in Option tab specify some units forward OR 2) Read Help about TREND and FORECAST, and SLOPE and INTERCEPT OR 3) Get crystal bal...

Can't do adjustment in analytical accounting
I am trying to change an analytical assignmnet through the Edit Analysis. When I try and change it, I receive an error stating "The Code of this Transaction Dimension cannot be adjusted". Has anyone seen this before? I have done similar changes many times, but I don't know why I can't now. Any insight would be helpful. Thanks, KJ Hi KJ What version of Gp are you running? I haveseen this happen in 8 but one of the service packs fixed it. (I think it was SP 4 or 5) Fliehigh "KJ" wrote: > I am trying to change an analytical assignmnet through the Edit >...

Can I share entities in migration process?
The entities in CRM have only one owning user. If I want=20 who a user see a entity of another user, the entity must=20 be shared with this user.=20 Well, I want migrate entities who must be shared with some=20 users. Exists a way to do it? Thank you for pay attention and sorry my bad english. []'s Vin=EDcius Pitta Lima de Ara=FAjo ...

Formula for cross tab data filling
Hi All Excel 2003 How to using formula for data filling as below (Y/N) ? Sheet A Product A Product B Product C System A Y N Y System B Y Y N Sheet B System A Product A System A Product C System B Product A System B Product B moonhkt ...

number format with leading 0
Dose anyone know how to create a number format that would show a leading zero for the numbers 0-9. That is, so that 1 would show as 01. I can do with a text format but would like to retain the integrity of the number. Thanks Try this: Format>Cells>Number Category: Custom Type: 00 Click [OK] Does that help? *********** Regards, Ron "Darby" wrote: > Dose anyone know how to create a number format that would show a leading zero > for the numbers 0-9. That is, so that 1 would show as 01. I can do with a > text format but would like to retain the integrity...

Help with importing data
Can I have users fill in a form in Access and have that data be transferred and updated to a spreadsheet. Need for fill out several fields and then export to a specific spreadsheet and place that data into the cells that will update that cell (add to the total in that cell) of a spreadsheet. ...

can't open new worksheets in a separate window
I've been trying to open multiple wookbooks in Excel, but they won't open in a new window. Instead they continue to open in the same window - one on top of the other. I've tried playing around with the maximize and restore, but to no avail. I tried right clicking on the Excel button in the taskbar to cascade the windows, but the pop-up menu is inactive. any advice would be greatly appreciated. Running Excel 2003, Windows XP. This might be it: Tools - Options - View tab - Show: Windows in taskbar. Earl Kiosterud www.smokeylake.com "3R's" <3R's@di...