ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to jump to a groupeded cell (https://www.excelbanter.com/excel-discussion-misc-queries/218407-how-jump-groupeded-cell.html)

Michiel via OfficeKB.com

How to jump to a groupeded cell
 
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.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200901/1



All times are GMT +1. The time now is 07:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com