LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default After made a filter selection, hide to select visible rows based onthe registration in the visible cell related to the visible row above

Dear,

A new challange on the end of this year..... :)
Perhaps somebody like to solve and help me out.

I've got a list with data like;

Column N:
row2 x
Row3 x
Row4 data-A
Row5 data-A
Row6 data-B
Row7 x
Row8 data-B
Row9 x
Row10 x
Row11 data-A
Row12 data-A
Row13 data-A
Row14 data-B
Row15 data-A
Row16 x
Row17 x
Row18 x

Now I make a filterselection in column N for "Data-B" and "x"
(I need "x" also because its a special headingrow for selected 'Data-' fields).

So I get after the selection;

Column N:
row2 x
Row3 x
Row6 data-B
Row7 x
Row8 data-B
Row9 x
Row10 x
Row14 data-B
Row16 x
Row17 x
Row18 x

As you can see, the rows with other data then "Data-B" and "x" are hidden rows now.

The question now is to get a macro that will hide from those 'visible rows' the rows with an "x" in column N if the visible row direct below it, has also a "x" or the row below is empty (that means for the last rows)

Then you get;

Column N:
Row3 x
Row6 data-B
Row7 x
Row8 data-B
Row10 x
Row14 data-B

Something like...... Column N, From 2nd row till last, If visible cell contains "x" and below visible cell contains "x" or below visible cell is empty, then 'hide row'. Next row.

regards, Johan





 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select first 5 visible rows Paul Brown[_2_] Excel Programming 2 January 5th 08 03:19 PM
hide zero rows / shadwe every other visible Steve[_4_] Excel Programming 1 October 10th 07 07:26 PM
Excel sheet: selection of cell or rows not visible. Hisoul Excel Worksheet Functions 2 May 16th 07 09:06 PM
Hide a visible rows Wanna Learn Excel Discussion (Misc queries) 5 February 15th 07 08:23 PM
how do i select all the visible cells only when using auto filter shaurabh Excel Discussion (Misc queries) 4 June 25th 06 07:32 AM


All times are GMT +1. The time now is 04:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"