Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Value of next visible mycell within a rng
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ListBox1. add item myCell.entirerow | Excel Discussion (Misc queries) | |||
Custom Data Validation : Lock if MyCell = ""? | Excel Worksheet Functions | |||
Autoshapes not visible on spreadsheet but visible in print preview | Excel Discussion (Misc queries) | |||
Toggle text to be visible and not visible | Excel Programming | |||
Toggle Text in a column to be visible or not visible | Excel Programming |