Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Joe Joe is offline
external usenet poster
 
Posts: 476
Default freezing data in a cell which was obtained using a formula

I am using Excel as a form. Upon initial opening of form, I am generating a
Random interger that once generated, I would like to freeze on that excel
sheet
as a tracking # in a cell. My problem is that Excel keep recalculating that
cell each
and every time the spread sheet opens. Is there any way to freeze date in
cell after a formula calculate the initial number?
The excel sheet will be saved individually using that Random interger. This
is to track the Excel sheet forms. Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default freezing data in a cell which was obtained using a formula

Place this code into ThisWorkbook (Right click the Excel icon beside File and
select view code)

Private Sub Workbook_Open()
With Worksheets("Sheet1").Range("A1")
If .Value = "" Then .Value = Round(Rnd() * 1000, 0)
End With
End Sub

The code checks to see if there is a Value in Cell A1 on sheet1. If not then
it puts in a random number. If there is a value then it does nothing.
--
HTH...

Jim Thomlinson


"Joe" wrote:

I am using Excel as a form. Upon initial opening of form, I am generating a
Random interger that once generated, I would like to freeze on that excel
sheet
as a tracking # in a cell. My problem is that Excel keep recalculating that
cell each
and every time the spread sheet opens. Is there any way to freeze date in
cell after a formula calculate the initial number?
The excel sheet will be saved individually using that Random interger. This
is to track the Excel sheet forms. Thanks.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Highlighting cells if a value is obtained dippy Excel Discussion (Misc queries) 4 January 7th 10 06:33 PM
Excel 2003 freezing when changing a cell or adding new data hoffmaks Excel Discussion (Misc queries) 1 May 24th 09 07:07 AM
Using cell reference in a formula instead of the obtained value Kombu Excel Worksheet Functions 2 November 6th 07 03:53 PM
transform hour data obtained from access database to decimal Sebastian Excel Discussion (Misc queries) 1 January 18th 07 12:11 PM
Freezing the cell (with Random formula) Christy Excel Discussion (Misc queries) 12 December 21st 05 03:28 PM


All times are GMT +1. The time now is 04:20 PM.

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

About Us

"It's about Microsoft Excel"