+ Reply to Thread
Results 1 to 6 of 6

Enhance existing code to hide rows between specific text

  1. #1
    Registered User
    Join Date
    12-21-2012
    Location
    Flroida
    MS-Off Ver
    Excel 2016
    Posts
    39

    Enhance existing code to hide rows between specific text

    Hi All

    I need help with my existing code. I have a workbook which contains 8 worksheets. I want to able to run a macro that looks for specific words in column A of each worksheet and hides any rows in between the specified words. The following code works except if a worksheet does not contain the specified words. Is there a better way to accomplish this?

    Attached is an example of the spreadsheet. The code below works just fine on the tabs highlighted in green, but halts on the tab highlighted in red. The tab highlighted in yellow is showing you the rows I need to hide.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Enhance existing code to hide rows between specific text

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-21-2012
    Location
    Flroida
    MS-Off Ver
    Excel 2016
    Posts
    39

    Re: Enhance existing code to hide rows between specific text

    Hi John - Thanks for the reply... the code you provided works except on the one worksheet that doesn't have EBITDA %. That one ends up having all rows hidden except the EBITDA TTM row. See attached.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Enhance existing code to hide rows between specific text

    Try:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    12-21-2012
    Location
    Flroida
    MS-Off Ver
    Excel 2016
    Posts
    39

    Re: Enhance existing code to hide rows between specific text

    Thank you John... that works.

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Enhance existing code to hide rows between specific text

    You're welcome. Glad to help out and thanks for the feedback. Please comply with Forum Rule No. 9.


    9. Acknowledge the responses you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved". Or click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Dropdown option or Edit button will not appear -- ask a moderator to mark it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Would like to hide specific text inside macro vba code
    By keisen in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-24-2015, 07:08 PM
  2. [SOLVED] Macro code to show only the rows with specific cell text in a particular column
    By Itachi1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-04-2013, 01:33 PM
  3. [SOLVED] My formatting code takes forever - please enhance?
    By nickmax1 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-10-2013, 06:33 AM
  4. Need help to enhance disabling of various features on this code
    By alchavar in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-04-2013, 09:54 AM
  5. Need help to enhance and improve VBA code. Need to end the operations
    By BrandonFromSingapore in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-29-2012, 03:34 AM

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.6.0 RC 1