ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   freeze cells (https://www.excelbanter.com/excel-programming/330079-freeze-cells.html)

LL0rd

freeze cells
 

Hi,

I've got a little problem with Excel. I have to protect some cells from
changing its value. One little example: A1=2; A2=3; C1=A1*A2;

Now we have C1=6. But if you change the value of A1 or A2, the value of
C1 also changes. How can I freeze the Value? I have to do it by a macro,
because there are lots of different cells to freeze.


--
LL0rd
------------------------------------------------------------------------
LL0rd's Profile: http://www.excelforum.com/member.php...o&userid=23712
View this thread: http://www.excelforum.com/showthread...hreadid=373879


Darrin Henshaw

freeze cells
 
If the value of A1, and A2 are never to change, just protect them all.
The only other way I can see is to somehow work in a paste special
command, and just paste the value. I don't know if that would work for
you.



*** Sent via Developersdex http://www.developersdex.com ***

Helen Trim[_7_]

freeze cells
 
This procedure does what you want for the activecell:

Sub Freeze()
ActiveCell.Formula = ActiveCell.Value
End Sub

HTH
--
Helen


"LL0rd" wrote:


Hi,

I've got a little problem with Excel. I have to protect some cells from
changing its value. One little example: A1=2; A2=3; C1=A1*A2;

Now we have C1=6. But if you change the value of A1 or A2, the value of
C1 also changes. How can I freeze the Value? I have to do it by a macro,
because there are lots of different cells to freeze.


--
LL0rd
------------------------------------------------------------------------
LL0rd's Profile: http://www.excelforum.com/member.php...o&userid=23712
View this thread: http://www.excelforum.com/showthread...hreadid=373879



LL0rd[_2_]

freeze cells
 

Helen Trim Wrote:
This procedure does what you want for the activecell:

Sub Freeze()
ActiveCell.Formula = ActiveCell.Value
End Sub

HTH
--
Helen



Jeah! Great THX!


--
LL0rd
------------------------------------------------------------------------
LL0rd's Profile: http://www.excelforum.com/member.php...o&userid=23712
View this thread: http://www.excelforum.com/showthread...hreadid=373879



All times are GMT +1. The time now is 10:45 AM.

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