+ Reply to Thread
Results 1 to 5 of 5

Hiding Columns based on Row Values (continued...)

  1. #1
    Registered User
    Join Date
    01-22-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    55

    Hiding Columns based on Row Values (continued...)

    Hi all,

    Hope all is well and you enjoying your long bank holiday weekend!

    I'm continuing to evolve a worksheet change macro which I got some previous help from on here:

    HTML Code: 
    I'd much appreciate any further help to finish this off - learning alot!

    I have attached a test workbook and embedded my macro below.

    Please Login or Register  to view this content.

    The aim of the game is to hide rows not contained with the week ranges in column B - for example if WEEK2 and WEEK4 are select, any columns NOT WEEK2, WEEK3 and WEEK4 should be hidden.

    Also if no data is in column B (in either reference cells) no columns should be hidden.


    A thanks to Olly and GC Excel for your help in the previous post - if you want to continue helping it would be greatly welcomed!


    All the best,


    Coeus.
    Attached Files Attached Files

  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
    44,425

    Re: Hiding Columns based on Row Values (continued...)

    See if this works for you:

    Please Login or Register  to view this content.

    Regards, TMS
    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
    Registered User
    Join Date
    01-22-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    55

    Re: Hiding Columns based on Row Values (continued...)

    Hiya TMS.

    I changed the following and it worked like a charm:

    If rInterest(1) = "" And rInterest(2) = "" Then

    If rInterest(1) = "" OR rInterest(2) = "" Then


    Many thanks for your help!

    Reputation added!


    Regards,



    Coeus.

  4. #4
    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
    44,425

    Re: Hiding Columns based on Row Values (continued...)

    You're welcome. Thanks for the rep.


    Sorry, thought you meant both empty ... but makes sense that it's either.

    Cheers, TMS

  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
    44,425

    Re: Hiding Columns based on Row Values (continued...)

    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.

+ 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. Hiding different columns based on multiple cell values
    By shane1049 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-01-2013, 03:52 PM
  2. [SOLVED] hiding columns based on certain criteria
    By Solaris in forum Excel Programming / VBA / Macros
    Replies: 25
    Last Post: 07-02-2013, 08:45 AM
  3. Un-Hiding and Hiding Columns based on Drop-Down Values in a Column.
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 10-30-2011, 09:24 AM
  4. Un-Hiding and Hiding Columns based on Drop-Down Values in a Column.
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2011, 06:49 AM
  5. Making Columns One...Continued
    By hbeek in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 04-08-2008, 10:27 PM

Tags for this Thread

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