+ Reply to Thread
Results 1 to 6 of 6

Hiding Excel SPreadsheet rows according to the values entered in a cell on the same sheet

  1. #1
    Registered User
    Join Date
    01-15-2012
    Location
    Hampshire
    MS-Off Ver
    Excel 2007
    Posts
    38

    Hiding Excel SPreadsheet rows according to the values entered in a cell on the same sheet

    The following is something I've lifted from another post as being a suitable solution for something I want to do in a spreadsheet - ie hide certain rows when a cell is set to certain values. The problem is I have no idea how and where to apply it to my spreadsheet. Can you point me in the right direction please. Also - are any of the names here dependent on the name of the sheet I'm applying it to or are they generic? Once I get this in and amended I'm sure it will help me along my learning curve. Thanks


    Please Login or Register  to view this content.
    Last edited by orly_sm; 09-05-2012 at 09:15 AM. Reason: amend post title to conform with rules

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: macro or VBA?

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.


  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: macro or VBA?

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

  4. #4
    Registered User
    Join Date
    01-15-2012
    Location
    Hampshire
    MS-Off Ver
    Excel 2007
    Posts
    38

    Re: macro or VBA?

    Quote Originally Posted by zbor View Post
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    I've done it as requested

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Hiding Excel SPreadsheet rows according to the values entered in a cell on the same sh

    It will look for value in A1 in current sheet (where you run macro).
    If you want specific sheet use Sheet("Sheet2").Range("A1") instead of just Range(A2")

    In this example it would be better to use Case approach rather than IF-else
    Last edited by zbor; 09-05-2012 at 02:25 PM.

  6. #6
    Registered User
    Join Date
    01-15-2012
    Location
    Hampshire
    MS-Off Ver
    Excel 2007
    Posts
    38

    Re: Hiding Excel SPreadsheet rows according to the values entered in a cell on the same sh

    Thanks for that Zbor but my dilemma remains in that I don't know how to record the macro, if that's what it is, and get it to run whenever I change the value of a cell which will have one of two values from a drop down menu in Cell C:3. Can you explain please?

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