Moderatori: Anthony47, Flash30005
=CONTA.SE($A$1:$E$10;G1)
Sub RandStats()
Dim myRan As String, cCell As Range, spRan As Range
Dim rMin As Long, rMax As Long, mySpie As String
'
myRan = "A1:E10" '<<< L'area da riempire con numeri random
rMin = 0 '<<< Il valore Min dei numeri random
rMax = 18 '<<< Il valore Max dei numeri random
mySpie = "G1" '<<< L'area dove cominciano i numeri sotto esame
'
Set spRan = Range(Range(mySpie), Range(mySpie).End(xlDown))
'***1
For Each cCell In Range(myRan)
cCell.Value = Application.WorksheetFunction.RandBetween(rMin, rMax)
Next cCell
For Each cCell In spRan
cCell.Offset(0, 3) = cCell.Offset(0, 1) + cCell.Offset(0, 3)
Next cCell
spRan.Cells(spRan.Rows.Count + 1, 4) = spRan.Cells(spRan.Rows.Count + 1, 4) + 1
'***2
End Sub
For I=1 to IlNumeroDiVolte 'es For I=1 to 100
Next I
Torna a Applicazioni Office Windows
Macro modifica date scelta periodo Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 11 |
Supporto per sviluppo macro VBA Ordinare per data Autore: Carletto Ribolla |
Forum: Applicazioni Office Windows Risposte: 3 |
Inserire add.in nella barra di avvio veloce in excel 2003 Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 4 |
Excel: problema con date se devo unirle a testi Autore: valle1975 |
Forum: Applicazioni Office Windows Risposte: 5 |
Visitano il forum: Nessuno e 8 ospiti