Dim PrvniRadekDat As Long, PoslRadekDat As Long, Radku As Long, SloupecDat As Integer, Data(), i As Long, rngErr As Range
PrvniRadekDat = 5
SloupecDat = 9
With ThisWorkbook.Worksheets("DATA")
PoslRadekDat = .Cells(.Rows.Count, SloupecDat).End(xlUp).Row
If PoslRadekDat < PrvniRadekDat Then MsgBox "Žádná data.", vbInformation: Exit Sub
Radku = PoslRadekDat - PrvniRadekDat + 1
ReDim Data(1 To Radku, 1 To 1)
If Radku = 1 Then Data(1, 1) = .Cells(PrvniRadekDat, SloupecDat).Value Else Data = .Cells(PrvniRadekDat, SloupecDat).Resize(Radku).Value
For i = 1 To Radku
If Data(i, 1) = "err" Then
If rngErr Is Nothing Then Set rngErr = .Cells(PrvniRadekDat + i - 1, SloupecDat - 1) Else Set rngErr = Union(rngErr, .Cells(PrvniRadekDat + i - 1, SloupecDat - 1))
End If
Next i
If Not rngErr Is Nothing Then rngErr.ClearContents
End With
End Sub