test

Matheeus

Webmaster
Original poster
Amministratore
10 Luglio 2017
93
84
20
Aversa
www.netora.it
2016 Mac
Visual Basic:
Private Sub Worksheet_Activate()
Dim sh As Worksheet
Set sh = ThisWorkbook.Sheets("Sheet2")

Dim i As Integer
Dim n As Integer

For n = 2 To 5

For i = 0 To sh.Range("B" & n).Value * 100
VBA.DoEvents
sh.Range("C" & n).Value = i / 100
Next i

If sh.Range("B" & n).Value <> sh.Range("C" & n).Value Then

sh.Range("C" & n).Value = sh.Range("B" & n).Value
End If
Next n
End Sub