Bonjour à toutes et à tous.
Voilà je m'explique ! J'aimerai regrouper 3 macros en une seule. Ce qui diffère entre chacunes des macros ci-dessous ne sont
que les plages de sélection et destination. J'ai pense à ajouter un STEP dans un for mais je ne vois quand même comment faire ! Pourriez-vous m'aider ?
Merci d'avance
Sub MultiplieParMille()
Dim Tabl
Dim i As Integer, j As Integer
Tabl = Range("A:A").Value ( Plage de selection)
For i = 1 To Cells(Rows.Count, 1).End(xlUp).Row
For j = 1 To 1
If IsNumeric(Tabl(i, j)) And Not IsEmpty(Tabl(i, 1)) Then
Tabl(i, j) = Tabl(i, j) * 1000
End If
Next j
Next i
Application.ScreenUpdating = False
Range("B:B") = Tabl (Plage de destination)
End Sub
Sub MultiplieParMille2()
Dim Tabl
Dim i As Integer, j As Integer
Tabl = Range("C:C").Value ( Plage de selection)
For i = 1 To Cells(Rows.Count, 1).End(xlUp).Row
For j = 1 To 1
If IsNumeric(Tabl(i, j)) And Not IsEmpty(Tabl(i, 1)) Then
Tabl(i, j) = Tabl(i, j) * 1000
End If
Next j
Next i
Application.ScreenUpdating = False
Range("D:D") = Tabl (Plage de destination)
End Sub
Sub MultiplieParMille3()
Dim Tabl
Dim i As Integer, j As Integer
Tabl = Range("E:E").Value ( Plage de selection)
For i = 1 To Cells(Rows.Count, 1).End(xlUp).Row
For j = 1 To 1
If IsNumeric(Tabl(i, j)) And Not IsEmpty(Tabl(i, 1)) Then
Tabl(i, j) = Tabl(i, j) * 1000
End If
Next j
Next i
Application.ScreenUpdating = False
Range("F:F") = Tabl (Plage de destination)
End Sub