My code looks - so far - like this:
===========================================================
ActiveSheet.Rows(2).AutoFilter Field:=32, Criteria1:=">" & CStr(SalesDate),
Operator:=xlAnd
j = Cells(65536, 9).End(xlUp).Row
Set rng = Range("I2:I" & j).SpecialCells(xlCellTypeVisible)
For Each Mycell In rng.Cells
' PUT CODE HERE
Next Mycell
===========================================================
Now, how do I get the value of the next MyCell in the defined rng as I want
to do some code that compares the active MyCell against the next MyCell in
line ? fx:
If Mycell = Mycell.next then ' does NOT work
SalesForItem = SalesForItem + 1
Else
SalesForItem = 0
End If
I've tried using the offset command; Mycell.Next.Offset(1, 0) , but that
does not work as I have an Autofilter active.
Please help.
Rasmus
Bookmarks