+ Reply to Thread
Results 1 to 3 of 3

Hide Rows that a value in a column = 0

  1. #1
    Registered User
    Join Date
    04-03-2013
    Location
    miami, florida
    MS-Off Ver
    Excel 2007
    Posts
    46

    Question Hide Rows that a value in a column = 0

    I am trying to hide the entire row, if the value in the second column is 0 and unhide it if that changes (it is a formula that is changing the value).

    I would like it to automatically do this anytime there is a change in the worksheet, or when that tab of the worksheet is opened/selected.

    I have never made a macro in Excel before, I kind of took a few things I found and combined them to make this, but it seems to have no effect at all, maybe it is not being triggered, maybe the code is bad? I do not know.

    P.S. I do not know if you have to compile this or how you even attatch it to the worksheet, that may be a start, or if just saving it works? I know a little bit of java, and C+ from forever ago, but nothing of VB.

    Thank you for the help!



    Please Login or Register  to view this content.

    --------------------------------------------------------------------------------
    Last edited by arlu1201; 04-05-2013 at 02:58 PM.

  2. #2
    Registered User
    Join Date
    04-03-2013
    Location
    miami, florida
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: Hide Rows that a value in a column = 0

    Welp nevermind, my code was messed up, I used this code instead, and assigned it to a button on the worksheet tab and it works great.


    Please Login or Register  to view this content.
    Last edited by arlu1201; 04-05-2013 at 02:58 PM.

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Hide Rows that a value in a column = 0

    rbac,

    Welcome to the forum.

    I have added code tags to your posts. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. In order to put code tags, either type [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] at the end of it, OR you can highlight your code and click the # icon at the top of your post window.

    Also, I am marking your thread as Solved, since you have solved it. To do so in future - select Thread Tools -> Mark thread as solved.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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