M
Michiel via OfficeKB.com
Hi,
I have a macro that is grouping rows by the value in column A (col A is
sorted)
Above that I have 7 empty rows at the top which will not be grouped. These
rows are frozen.
Now, after running this macro I have this 7-row header and about 30 grouped
rows (which each comprise some 10 to hundreds of underlying rows). The first
grouped cell is FOR EXAMPLE Row 533 (thus rows 8-532 are hidden by the group
functionality)
I want to go to the first grouped row (In my example row 533). I f I use my
keyboard I do it like this:
I click in Cell A7 (the last frozen row)
I hit the keydown key on the keyboard once, and I am in the grouped cell.
Ready!
Now I want to do it by code.
I tried:
cells(7,1).Offset(rowOffset:=1).Activate
But then I indeed end up in row 8 instead of row 533 as planned.
Since the grouping depends on the data that I process, the 533rd row is not
fixed. It could also be 500 rows. So directly selecting the hard address is
no option.
Any idea/ suggestion. (Sorry for long story).
M.
I have a macro that is grouping rows by the value in column A (col A is
sorted)
Above that I have 7 empty rows at the top which will not be grouped. These
rows are frozen.
Now, after running this macro I have this 7-row header and about 30 grouped
rows (which each comprise some 10 to hundreds of underlying rows). The first
grouped cell is FOR EXAMPLE Row 533 (thus rows 8-532 are hidden by the group
functionality)
I want to go to the first grouped row (In my example row 533). I f I use my
keyboard I do it like this:
I click in Cell A7 (the last frozen row)
I hit the keydown key on the keyboard once, and I am in the grouped cell.
Ready!
Now I want to do it by code.
I tried:
cells(7,1).Offset(rowOffset:=1).Activate
But then I indeed end up in row 8 instead of row 533 as planned.
Since the grouping depends on the data that I process, the 533rd row is not
fixed. It could also be 500 rows. So directly selecting the hard address is
no option.
Any idea/ suggestion. (Sorry for long story).
M.