+ Reply to Thread
Results 1 to 7 of 7

Auto hide named range based on text not being present in cell

  1. #1
    Registered User
    Join Date
    01-23-2018
    Location
    Dallas, TX
    MS-Off Ver
    2010
    Posts
    2

    Auto hide named range based on text not being present in cell

    Hi, looking for some help with a sheet that hides unused rows of named ranges if a specified cell does not have any text. Any assistance is appreciated!

    Here's my current code, it hides everything, even if there is text in the designated cell.

    Please Login or Register  to view this content.
    Last edited by 64Gerb; 01-24-2018 at 05:38 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,946

    Re: Auto hide named range based on text not being present in cell

    Rather than (C30), I would expect to see Range("C30").Value. And similarly, for the other "ranges".
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,946

    Re: Auto hide named range based on text not being present in cell

    Oh, and ... welcome to the forum, but please take a few moments to read the forum rules ...

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

  4. #4
    Registered User
    Join Date
    01-23-2018
    Location
    Dallas, TX
    MS-Off Ver
    2010
    Posts
    2

    Re: Auto hide named range based on text not being present in cell

    Thanks TMS! That fixed it.

    Also, do you have any know how on sending a worksheet to the body of an Outlook email and maintaining formatting? I have the email macro running well, I was sure not to merge any cells, but a few cells that have a lot text push the format way out of whack.

    Thanks again!

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,946

    Re: Auto hide named range based on text not being present in cell

    Have a look at Ron de Bruin's web site. Everything you need to know about integrating Excel and Outlook.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,946

    Re: Auto hide named range based on text not being present in cell

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  7. #7
    Forum Expert
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,513

    Re: Auto hide named range based on text not being present in cell

    Please Login or Register  to view this content.

+ 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. [SOLVED] Auto Hide Rows based on Cell Value in Named Range
    By PaulHatton in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-03-2015, 06:05 PM
  2. [SOLVED] Hide rows in a named range based on cell value
    By Ravana in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-17-2015, 01:54 AM
  3. named range based on cell text in vba
    By zak.horrocks in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-02-2014, 12:16 PM
  4. named range based on cell text
    By zak.horrocks in forum Excel General
    Replies: 1
    Last Post: 12-02-2014, 12:07 PM
  5. [SOLVED] autofilter sheets based on cell value and hide sheet if value not present
    By desibabuji in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-30-2013, 05:39 AM
  6. Auto Hide And Unhide Row Based On Empty Cell In Specific Range
    By jackgan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-26-2013, 09:18 AM
  7. [SOLVED] Auto Hiding rows based on range/data present or not present.
    By raze in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 02-10-2013, 11:27 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