I want to filter my DB by the values in the first column 1 and find duplicates checking the value in column 83 (values in columns 83 for visible cells must be different).
What I am doing wrong with my code?
Set sh = ActiveSheet
RowCount = 0
For Each rw In sh.Rows
Value = sh.AutoFilter.Range.Offset(1).SpecialCells(xlCellTypeVisible).Cells(1, 1).Value
sh.Range("$A$1:$DA$1156").AutoFilter Field:=1, Criteria1:= _
Value
MsgBox (Value)
For Each ele In Range("$A$1:$DA$1156").SpecialCells(xlCellTypeVisible)
Version = ele.SpecialCells(xlCellTypeVisible).Cells(1, 83).Value
For i = 2 To 30 ' Revise the 30 to include all of your values
If sh.Range("A:ZZ").SpecialCells(xlCellTypeVisible).Cells(i, 83).Value = Version Then
MsgBox ("Found value on row " & i)
End If
Next i
Next ele
Next rw
End Sub
Bookmarks