N
noyau
I am after to store the "daily variables of a single cell" into a column and
form a serie.
Every day, the value in the cell (say A1) is altered. I want to extract that
value from A1 to any other place to get the history of the A1. The date of
the data will be attached to the value. Is there a way?
In the below logic we get random numbers for lotterie, and every draw is
written to the next row. How does it come? This is in fact what I am looking
for but I was enable to extract the good fo the program for me.
Happy new year to everyone...
Function RandLotto(Bottom As Integer, Top As Integer, _
Amount As Integer) As String
'From: http://www.ozgrid.com/VBA/RandomNumbers.htm
'by Dave Hawley & JE McGimpsey
Dim iArr As Variant
Dim i As Integer
Dim r As Integer
Dim temp As Integer
Application.Volatile
ReDim iArr(Bottom To Top)
For i = Bottom To Top
iArr(i) = i
Next i
For i = Top To Bottom + 1 Step -1
r = Int(Rnd() * (i - Bottom + 1)) + Bottom
temp = iArr(r)
iArr(r) = iArr(i)
iArr(i) = temp
Next i
For i = Bottom To Bottom + Amount - 1
RandLotto = RandLotto & " " & iArr(i)
Next i
RandLotto = Trim(RandLotto)
End Function
Sub Draw()
Dim iMyNumber As Long
For iMyNumber = 1 To 200
Calculate
Next iMyNumber
Range("G65536").End(xlUp)(2).Value = Range("B2").Value
End Sub
Sub Reset()
Sheets("Draw").Select
Columns("G:G").ClearContents
Range("G1").Select
End Sub
form a serie.
Every day, the value in the cell (say A1) is altered. I want to extract that
value from A1 to any other place to get the history of the A1. The date of
the data will be attached to the value. Is there a way?
In the below logic we get random numbers for lotterie, and every draw is
written to the next row. How does it come? This is in fact what I am looking
for but I was enable to extract the good fo the program for me.
Happy new year to everyone...
Function RandLotto(Bottom As Integer, Top As Integer, _
Amount As Integer) As String
'From: http://www.ozgrid.com/VBA/RandomNumbers.htm
'by Dave Hawley & JE McGimpsey
Dim iArr As Variant
Dim i As Integer
Dim r As Integer
Dim temp As Integer
Application.Volatile
ReDim iArr(Bottom To Top)
For i = Bottom To Top
iArr(i) = i
Next i
For i = Top To Bottom + 1 Step -1
r = Int(Rnd() * (i - Bottom + 1)) + Bottom
temp = iArr(r)
iArr(r) = iArr(i)
iArr(i) = temp
Next i
For i = Bottom To Bottom + Amount - 1
RandLotto = RandLotto & " " & iArr(i)
Next i
RandLotto = Trim(RandLotto)
End Function
Sub Draw()
Dim iMyNumber As Long
For iMyNumber = 1 To 200
Calculate
Next iMyNumber
Range("G65536").End(xlUp)(2).Value = Range("B2").Value
End Sub
Sub Reset()
Sheets("Draw").Select
Columns("G:G").ClearContents
Range("G1").Select
End Sub