Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello All:
I would like to take the results of an AutoFilter and have it show the normal results plus the next row of each result. Ex: Unfiltered Page: Rows 1 - 20 Typical AutoFilter result: Rows 2, 10, 15 Desired AutoFilter result: Rows 2,3,10,11,15 & 16 Uber Thanks for any help or direction, Randy |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub ShowRows()
Dim rng As Range, i As Long Set rng = ActiveSheet.AutoFilter.Range Set rng = rng.Offset(1, 0).Resize(rng.Rows.Count - 1, 1) For i = rng(rng.Count).Row To rng.Row Step -1 If rng(i - rng.Row + 1).EntireRow.Hidden = False Then rng(i - rng.Row + 2).EntireRow.Hidden = False End If Next End Sub -- regards, Tom Ogilvy "RAP" wrote: Hello All: I would like to take the results of an AutoFilter and have it show the normal results plus the next row of each result. Ex: Unfiltered Page: Rows 1 - 20 Typical AutoFilter result: Rows 2, 10, 15 Desired AutoFilter result: Rows 2,3,10,11,15 & 16 Uber Thanks for any help or direction, Randy |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom,
You are AWESOME !! Thank you so much. Works perfectly. Randy "Tom Ogilvy" wrote: Sub ShowRows() Dim rng As Range, i As Long Set rng = ActiveSheet.AutoFilter.Range Set rng = rng.Offset(1, 0).Resize(rng.Rows.Count - 1, 1) For i = rng(rng.Count).Row To rng.Row Step -1 If rng(i - rng.Row + 1).EntireRow.Hidden = False Then rng(i - rng.Row + 2).EntireRow.Hidden = False End If Next End Sub -- regards, Tom Ogilvy "RAP" wrote: Hello All: I would like to take the results of an AutoFilter and have it show the normal results plus the next row of each result. Ex: Unfiltered Page: Rows 1 - 20 Typical AutoFilter result: Rows 2, 10, 15 Desired AutoFilter result: Rows 2,3,10,11,15 & 16 Uber Thanks for any help or direction, Randy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
emailing autofilter results | Excel Worksheet Functions | |||
Autofilter results | Excel Discussion (Misc queries) | |||
After autofilter my results are not visible.. | Excel Programming | |||
with formulas that show negative results I want to show zero inste | Excel Discussion (Misc queries) | |||
Delete results of Autofilter??? | Excel Programming |