Vim, ze je to urcite uplne primitivni, ale nejak si s tim nevim rady
Mnohokrat Vam dekuji za rady
Moderátor: Mods_senior
Kód: Vybrat vše
Sub PorovnejDatum()
Dim Oblast As Range
Dim i As Double
Set Oblast = ActiveWorkbook.Worksheets(1).UsedRange
With Oblast
For i = Oblast.Rows.Count To 1 Step -1
If .Rows(i).Cells(1).Value <> .Rows(i).Cells(5).Value Then
.Rows(i).Cells(1).Interior.ColorIndex = 33
Else
.Rows(i).Cells(1).Interior.ColorIndex = xlNone
End If
Next i
End With
End Sub
Kód: Vybrat vše
Sub PorovnejDatum()
Dim Oblast As Range
Dim i As Double
'Pokud jsou hodnoty ve sloupcich A a E ruzne, smaze se cely radek
Application.ScreenUpdating = False
Set Oblast = ActiveWorkbook.Worksheets(1).UsedRange
With Oblast
For i = Oblast.Rows.Count To 1 Step -1
If .Rows(i).Cells(1).Value <> .Rows(i).Cells(5).Value Then
.Rows(i).EntireRow.Delete
End If
Next i
End With
Application.ScreenUpdating = True
End Sub