+ Reply to Thread
Results 1 to 6 of 6

Need a macro to hide a row based on value in cell

  1. #1
    Registered User
    Join Date
    07-03-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    3

    Need a macro to hide a row based on value in cell

    I am trying to hide a row based on a 'yes' or 'no' value in a cell on the same sheet:

    Current code is:

    Please Login or Register  to view this content.
    Last edited by arlu1201; 07-03-2012 at 08:47 AM. Reason: Use code tags in future.

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

    Re: Need a macro to hide a row based on value in cell

    That code works fine as it is. What issue are you facing? Are you getting any error?
    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]

  3. #3
    Registered User
    Join Date
    07-03-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Need a macro to hide a row based on value in cell

    The value in the target cell is dependent on a dropdown list on another sheet - when I change the value in the dropdown sheet the target cell updates but the row does not hide. If I enter the yes/no manually in the cell the codes works fine.

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

    Re: Need a macro to hide a row based on value in cell

    You need to choose the selection change event for your code.

  5. #5
    Registered User
    Join Date
    07-03-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Need a macro to hide a row based on value in cell

    Done - still does not work.

    Please Login or Register  to view this content.
    Last edited by mlion; 07-03-2012 at 09:29 AM.

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

    Re: Need a macro to hide a row based on value in cell

    Please put code tags in post 5. Check my signature. I did it for you in post 1.

+ 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