You're welcome and thanks for the rep!
Well, if you have a continued line ( space underscore) it's like having your "If" one a single line and, with the colon you can add an action without needing the "End If":
If Cells(1, 1) = Num Then S = Cells(1, 1).Address Else _
Set R = Range("A:A").Find(Num, lookat:=xlWhole): S = R.Address
The next line is just a regular action to concatenate the tail of the range:
Set R = Range("A:A").Find(Num + 20, lookat:=xlWhole).Offset(-1, 0)
Maybe:
Sub Nekmat(): Dim Num As Long, S As String, R As Range
Num = Int(Cells(1, 2) / 10) * 10
If Cells(1, 1) = Num Then S = Cells(1, 1).Address Else _
Set R = Range("A:A").Find(Num, lookat:=xlWhole): S = R.Address
Set R = Range("A:A").Find(Num + 20, lookat:=xlWhole).Offset(-1, 0)
S = S & ":" & R.Address: Cells(1, 3) = S
Range(S).Copy Cells(1,4)
End Sub
Bookmarks