Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
CJ CJ is offline
external usenet poster
 
Posts: 102
Default volatile v non-volatile

Excel 2003. How can I switch from volatile to non-volatile? I don't want
randomly generated numbers to change every time the enter button is pushed or
a cell is modified. Thanks all.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default volatile v non-volatile

Hi,

You can turn calculation to manual but this of course affects all formula.
Aside from that there's not much you can do if your using RAND to get your
random numbers.

There are ways of getting non volatile random numbers and if you describe
what you want, someone will help.
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"CJ" wrote:

Excel 2003. How can I switch from volatile to non-volatile? I don't want
randomly generated numbers to change every time the enter button is pushed or
a cell is modified. Thanks all.

  #3   Report Post  
Posted to microsoft.public.excel.misc
CJ CJ is offline
external usenet poster
 
Posts: 102
Default volatile v non-volatile

I have a multiplication table for a child to learn with. I don't want the
randomly generated questions to change value until after the child has
completed all of the questions.

"Mike H" wrote:

Hi,

You can turn calculation to manual but this of course affects all formula.
Aside from that there's not much you can do if your using RAND to get your
random numbers.

There are ways of getting non volatile random numbers and if you describe
what you want, someone will help.
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"CJ" wrote:

Excel 2003. How can I switch from volatile to non-volatile? I don't want
randomly generated numbers to change every time the enter button is pushed or
a cell is modified. Thanks all.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 905
Default volatile v non-volatile

"CJ" wrote:
Excel 2003. How can I switch from volatile to non-volatile?
I don't want randomly generated numbers to change every
time the enter button is pushed or a cell is modified.


Create the following UDF:

Function myRAND(Optional r As Range) As Double
myRAND = Evaluate("RAND()")
End Function

(There are advantages of using Evaluate("RAND()") instead of VBA Rnd.)

You can call it as =myRAND(). It will not change until the entire worksheet
is recalculated, or you cause that cell to be recalculated (e.g. press F2,
Enter).

You can call is as =myRAND(B1). It will not change until B1 is
recalculated, or the entire worksheet is recalculated, or you cause that cell
to be recalculated.

Similarly, you have the following UDF:

Function myRANDBETWEEN(lo As Double, _
hi As Double, Optional r As Range) As Double
myRANDBETWEEN = _
Evaluate("RANDBETWEEN(" & lo & "," & hi & ")")
End Function


You wrote in another message:
I don't want the randomly generated questions to
change value until after the child has completed
all of the questions.


If all your questions use myRANDBETWEEN(10,99,B1), for example, you can
create a button to execute the following macro:

Sub newQuestions()
Range("b1") = ""
End Sub

To associate a button with the macro, click on View Toolbars Forms.
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 120
Default volatile v non-volatile

I'd suppose to renew all the task with a subroutine with changed fixed values :

Sub MultipTable()
Const NProb As Long = 10
Dim I As Long, J As Long, P(1 To 2) As String
For I = 1 To NProb
With Cells(I, 1)
For J = 1 To 2
.Formula = "=Randbetween(1,9)"
P(J) = CStr(.Value)
Next J
.Value = P(1) & " × " & P(2)
End With
Next I
End Sub

I hope not to spoil weekend for a lot of poor pupils.
--
Petr Bezucha


"CJ" wrote:

I have a multiplication table for a child to learn with. I don't want the
randomly generated questions to change value until after the child has
completed all of the questions.

"Mike H" wrote:

Hi,

You can turn calculation to manual but this of course affects all formula.
Aside from that there's not much you can do if your using RAND to get your
random numbers.

There are ways of getting non volatile random numbers and if you describe
what you want, someone will help.
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"CJ" wrote:

Excel 2003. How can I switch from volatile to non-volatile? I don't want
randomly generated numbers to change every time the enter button is pushed or
a cell is modified. Thanks all.

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
Volatile Symbol DOUG Excel Discussion (Misc queries) 4 April 21st 09 03:28 PM
How do I make DATE non-volatile? MichaelRobert Excel Worksheet Functions 3 June 21st 08 04:23 PM
INDEX - volatile or not? T. Valko Excel Worksheet Functions 8 February 23rd 07 07:24 PM
is MATCH a volatile function? Dave F Excel Discussion (Misc queries) 3 January 31st 07 07:05 PM
formula result=Volatile BCNU Excel Discussion (Misc queries) 2 January 5th 07 06:00 AM


All times are GMT +1. The time now is 01:29 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"