1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| Sub test10()
Dim LastLig As Long, i As Long, A As Variant
Application.ScreenUpdating = False
With Worksheets(1)
LastLig = .Cells(.Rows.Count, 1).End(xlUp).Row
For i = 2 To LastLig
If Cells(i, 27) <> "" Then
Cells(i, 38) = Cells(i, 27)
Else
Cells(i, 38) = Cells(i, 30)
End If
Next i
Tabl = .Range(.Cells(2, 38), .Cells(LastLig, 38))
A = InputBox("Valeur")
For t = 1 To UBound(Tabl, 1)
If Tabl(t, 1) = "" Then
Tabl(t, 1) = A
End If
Next
.Range(.Cells(2, 38), .Cells(LastLig, 38)).Value = Tabl
End With
End Sub |
Partager