Thank you. Your alternative approach works great.
Just for the record I include it into this thread:
Option Explicit
Sub Copy_range()
Dim awf As WorksheetFunction: Set awf = WorksheetFunction
Dim aws As Worksheet: Set aws = ActiveSheet
Dim rRow13 As Range
Dim lMatch As Long
With aws
Set rRow13 = .Rows(13)
On Error Resume Next
lMatch = 0: lMatch = awf.Match("Spec. 012", rRow13, 0)
On Error GoTo 0
If lMatch <> 0 Then
.Range(.Cells(14, lMatch), .Cells(100, lMatch)).Copy
End If
End With
End Sub
But my first aproach with added "If Not r1 is nothing then..." doesn't work. Maybe it is because if FIND function doesn't find value then it is not "nothing" but error.
IIf Not r1 Is Nothing Then
a1 = Split(r1.Address, "$")
Col_1 = a1(1)
End If
Bookmarks