![]() |
Excel Data Outlining
I have a spreadsheet that organizes data into an outline. When I expand an outline group to edit the data in the cells I have a button that, when clicked, writes the date the changes were made to the row. I only want to process the expanded rows when the "process Updates" button is clicked. I can't figure out how to detect whether a row is expanded outline range of rows to set the date. I have tried to use the visible and hidden properties but can't seem to find the correct command that will let me test them. Here is what I have tried so far trying to get te row numbers that are visible when an outline is expanded. Private Function GetRange() As Range Dim Rng As Range, RowNbr, temp, s AutoFilter is on Set Rng = ActiveSheet.AutoFilter.Range RowNbr = Rng.Rows.Count Set Rng = Intersect(Rng, Range("A:A")) Set Rng = Rng.Offset(1, 0).Resize(Rng.Rows.Count – 1 RowNbr = Rng.Rows.Count temp = Split(Rng.Address, ",") 'Set GetRange = Rng 'sets the array to the visible rows Set GetRange = Rng.SpecialCells(xlVisible) RowNbr = GetRange.Rows.Count 'Set GetRange = Range("Task_Table1!_FilterDatabase").SpecialCells( xlCellTypeVisible) End Function I am able to pull out 36 address ranges but if I have more I only get the first 36. I haven't found anything that says the specialcells(xlvisible) properties have a limit but it is very repeatable with the commands above. -- Stangard ------------------------------------------------------------------------ Stangard's Profile: http://www.thecodecage.com/forumz/member.php?userid=441 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=109091 |
All times are GMT +1. The time now is 07:32 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com