please how to determine in vba if first visible (after using filter) cell equals to the last visible cell?
If I have:
A5 = a, B5 = 1
A6 = b, B6 = 2
A7 = c, B7 = 1
A8 = a, B8 = 1
A9 = b, B9 = 2
Then If I filter out "1", column A will be: a, c, a. Then I need to do nothing.
But, when I filter out "2", Column A will be: b, b. Then I need to be C5 for example = b.
I cant use, because it will use also A1, A2, A3 and A4 (I suppose), but I need to be A5 the "last one".
I have this:
If Range("A5").End(xlDown).Value <> "first visible cell in Range("A5:A200")" Then ThisWorkbook.Sheets("Šablona").Range("B2").Value = "" Else ThisWorkbook.Sheets("Šablona").Range("B2").Value = "first visible cell" End If