A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

protect cell formatting



 
 
Thread Tools Display Modes
  #1  
Old December 20th, 2009, 10:09 AM posted to microsoft.public.excel.misc
David
external usenet poster
 
Posts: 1,494
Default protect cell formatting

Excel 2003 - I have a spreadsheet that has various cells with different types
of formatting - ie: bold / shade / font size etc. When a user copies / pastes
from text from 1 cell to another, it carries over the formatting as well as
the text - I want just the text to be copied.
  #2  
Old December 20th, 2009, 10:21 AM posted to microsoft.public.excel.misc
מיכאל (מיקי) אבידן
external usenet poster
 
Posts: 562
Default protect cell formatting

Instead of "regular" Paste - try 'PasteSpecial' Values' 'OK'
Micky


"David" wrote:

Excel 2003 - I have a spreadsheet that has various cells with different types
of formatting - ie: bold / shade / font size etc. When a user copies / pastes
from text from 1 cell to another, it carries over the formatting as well as
the text - I want just the text to be copied.

  #3  
Old December 20th, 2009, 11:39 AM posted to microsoft.public.excel.misc
David
external usenet poster
 
Posts: 1,494
Default protect cell formatting

Yes, thank you. I was hoping for someway to "lock" the formatting, as there
are several users of this spreadsheet - some are not so computer savy.

"מיכאל (מיקי) אבידן" wrote:

Instead of "regular" Paste - try 'PasteSpecial' Values' 'OK'
Micky


"David" wrote:

Excel 2003 - I have a spreadsheet that has various cells with different types
of formatting - ie: bold / shade / font size etc. When a user copies / pastes
from text from 1 cell to another, it carries over the formatting as well as
the text - I want just the text to be copied.

  #4  
Old December 21st, 2009, 04:56 PM posted to microsoft.public.excel.misc
Gord Dibben
external usenet poster
 
Posts: 20,252
Default protect cell formatting

If you are willing to use some VBA try this event code.

Private Sub Worksheet_Change(ByVal Target As Range)
'retain formatting when a cell is copied over
Dim myValue
With Application
.EnableEvents = False
myValue = Target.Value
.Undo
Target = myValue
.EnableEvents = True
End With
End Sub

This is sheet code. Right-click on the sheet tab and "View code"

Copy/paste the code into that sheet module.

Alt + q to return to Excel.

When you copy and paste, the destination formatting will be
retained...........source formatting is ignored.

Requires users to enable macros when opening the workbook.


Gord Dibben MS Excel MVP


On Sun, 20 Dec 2009 03:39:01 -0800, David
wrote:

Yes, thank you. I was hoping for someway to "lock" the formatting, as there
are several users of this spreadsheet - some are not so computer savy.

"????? (????) ?????" wrote:

Instead of "regular" Paste - try 'PasteSpecial' Values' 'OK'
Micky


"David" wrote:

Excel 2003 - I have a spreadsheet that has various cells with different types
of formatting - ie: bold / shade / font size etc. When a user copies / pastes
from text from 1 cell to another, it carries over the formatting as well as
the text - I want just the text to be copied.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:07 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 OfficeFrustration.
The comments are property of their posters.