+ Reply to Thread
Results 1 to 2 of 2

Thread: Need to hide all rows except what is currently selected or is empty

  1. #1
    Registered User
    Join Date
    08-16-2004
    Posts
    19

    Need to hide all rows except what is currently selected or is empty

    It has been years since I've used Excel macros and am more than rusty, so would appreciate help with this.

    I would like a macro to hide all rows except what is empty or what is in the current cell when I run the macro.

    So in column C, I have values like AFA, PCPR, PR, AFAE, AFAC, SC, CR, etc. (this group of values will grow) which repeat in column C througout the spreadsheet numerous times.
    Column C also has some empty cells which I would always like to remain visible.

    e.g.
    Column C
    AFA
    PCPR
    [empty]
    PR
    AFAE
    AFAC
    PCPR
    SC
    CR
    AFA
    PCPR
    [empty]
    SC
    CR

    Highlight PCPR and run macro

    Column C RESULTS:
    PCPR
    [empty]
    PCPR
    PCPR
    [empty]


    Thanks for your help

  2. #2
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    02-15-2008
    Location
    Grappenhall, UK
    MS-Off Ver
    Excel for Windows & Mac - all versions.
    Posts
    6,566

    Re: Need to hide all rows except what is currently selected or is empty

    Hi,

    Have you considered using the standard AutoFilter functionality?

    Regards
    Richard Buttrey

    If this was useful then please rate it appropriately.

    Click the small star icon at the bottom left of my post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0