ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Is there a way to lock out the format for the cell and still allow data entry and C&P? (https://www.excelbanter.com/new-users-excel/20334-there-way-lock-out-format-cell-still-allow-data-entry-c-p.html)

Marc

Is there a way to lock out the format for the cell and still allow data entry and C&P?
 
I've set the spread sheet and have locked all the cells but those that I
want to have filled with data. There are time when I would like to be able
to C&P the data to other sheets but when I do I also copy the format. I
know I can use "paste special" but I want it so anyone can use the C&P
without having to use "paste special".

Marc



Mark

Hi,
You could write a macro that uses a string for the cell
values.

sub cpme()
dim strCP as string
strcp=range("A1").value
strcp.copy
range("A2").paste

end sub

I am a bit rusty but this sub should give you the right
idea.
Creating a variable for the cell value does not include
any formatting.


0- Mark Sway



-----Original Message-----
I've set the spread sheet and have locked all the cells

but those that I
want to have filled with data. There are time when I

would like to be able
to C&P the data to other sheets but when I do I also copy

the format. I
know I can use "paste special" but I want it so anyone

can use the C&P
without having to use "paste special".

Marc


.



All times are GMT +1. The time now is 03:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com