+ Reply to Thread
Results 1 to 4 of 4

Hide rows based on cell value

  1. #1
    Registered User
    Join Date
    02-18-2019
    Location
    Bucharest
    MS-Off Ver
    2013
    Posts
    2

    Hide rows based on cell value

    Hello,

    Pls advice: I have a worksheet which has many formulas and I need the following to happen: when this worksheet is used, and some cells on different rows are filled with a number different than 0, the rows which contain cells with 0, to hide automatically. And this should happen everytime that worksheet is used, with different values.

    About the attached example:

    - The value that changes is in column B
    - D, E and F are merged cells on each row
    - talking about the attached example: I need rows with Text2, Text 4 and Text 5 to be hidden automatically, because in B column the value is zero for these rows.
    - IMPORTANT! - at each use of the worksheet, the rows that have 0 in column B are different. Not always the same. And also, this automatization must apply only to a certain selection in the document (let's say from rows 45 to 135).

    Thank you very much in advance for your help!

    Carla

    Capture.JPG

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: Hide rows based on cell value

    Are the values in column B entered manually or are they the result of a formula? Could you attach a copy of your file? It is difficult to work with a picture.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    02-18-2019
    Location
    Bucharest
    MS-Off Ver
    2013
    Posts
    2

    Re: Hide rows based on cell value

    The values in column B are entered manually. the range is between 1 and 100

    Thank you!

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: Hide rows based on cell value

    I'm not sure if I understood correctly but try this: Copy and paste this macro into the worksheet code module. Do the following: right click the tab name for your sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet. This macro assumes that you have headers in row 1 and your data starts in row 2. Enter a value in the range B2:B100.

    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] VBA to hide several rows based on cell value
    By MagicMan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-16-2018, 10:09 AM
  2. Hide rows based on cell value above
    By Keelin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-15-2016, 07:03 AM
  3. [SOLVED] Hide Rows Based on Cell Value
    By GoGoeGo in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-19-2015, 02:20 PM
  4. Hide Rows/Hide Columns Based on Value in Cell
    By brickwall823 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2015, 02:42 PM
  5. Need Toggle Button to hide/unhide rows based on cell value in non concurrent rows
    By The Phoenix in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-13-2015, 10:49 AM
  6. [SOLVED] First unhide all rows - then hide rows based on specific cell value for a range of cells
    By robbiekh in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-22-2013, 05:46 PM
  7. [SOLVED] Hide Rows based on Cell Value
    By nogoodnames in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-21-2012, 05:39 PM

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