Sub copia_lotto() Dim sh1 As Worksheet Dim sh2 As Worksheet Dim nRScelto As String Dim uR As Long Dim j As Long Dim i As Byte Dim x As Long Set sh1 = Foglio1 Set sh2 = Foglio2 Application.ScreenUpdating = False nRScelto = InputBox("Scegli un numero!") sh2.Cells.Clear With sh1 uR = .Cells(Rows.Count, 1).End(xlUp).Row x = 1 For j = 1 To uR For i = 4 To 8 If .Cells(j, i) = Val(nRScelto) Then .Range("A" & j & ":H" & j).Copy sh2.Cells(x, 1) x = x + 1 End If Next i Next j End With sh2.Activate sh2.Cells(1, 1).Select Application.ScreenUpdating = True Set sh1 = Nothing Set sh2 = Nothing End Sub