+ Reply to Thread
Results 1 to 11 of 11

VBA to hide rows based on cell value

  1. #1
    Forum Contributor
    Join Date
    05-30-2015
    Location
    Dubai
    MS-Off Ver
    Excel 2016 Mac & PC & 365
    Posts
    633

    VBA to hide rows based on cell value

    Hi,

    Could someone help with code please.
    I would like to hide all rows between 16-59 where the corresponding value in column K is =0

    Thanks
    Kevin
    Last edited by Excelski; 11-05-2019 at 10:09 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,877

    Re: Hide rows

    Administrative Note:

    More detail in your title, please!

    We would very much like to help you with your query, however the thread title does not really convey what your request is about.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    05-30-2015
    Location
    Dubai
    MS-Off Ver
    Excel 2016 Mac & PC & 365
    Posts
    633

    Re: Hide rows

    Sorry....done

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow

    Hi !

    Just apply an easy filter on rows 16-59 column K where > 0 …

  5. #5
    Forum Contributor
    Join Date
    05-30-2015
    Location
    Dubai
    MS-Off Ver
    Excel 2016 Mac & PC & 365
    Posts
    633

    Re: VBA to hide rows based on cell value

    Hi Marc,

    Thanks for looking. That won't work in my case because of the layout of the sheet

  6. #6
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow


    As on my side it always works whatever the layout …

  7. #7
    Forum Contributor
    Join Date
    05-30-2015
    Location
    Dubai
    MS-Off Ver
    Excel 2016 Mac & PC & 365
    Posts
    633

    Re: VBA to hide rows based on cell value

    Maybe I have misunderstood......How do I do it?

  8. #8
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow

    Often easily as an Excel basics. It depends on your layout, a helper column may be necessary,
    as we are not on a mind readers forum, restart from the forum rules / the yellow banner at the top of this page
    in order to create a post like any forum expects for an initial post …

  9. #9
    Forum Contributor
    Join Date
    05-30-2015
    Location
    Dubai
    MS-Off Ver
    Excel 2016 Mac & PC & 365
    Posts
    633

    Re: VBA to hide rows based on cell value

    Quote Originally Posted by Marc L View Post
    Often easily as an Excel basics. It depends on your layout, a helper column may be necessary,
    as we are not on a mind readers forum, restart from the forum rules / the yellow banner at the top of this page
    in order to create a post like any forum expects for an initial post …
    So it does depend on the layout......my request was, and still is, for a VBA solution, I could post a workbook with some numbers in column K if you feel that would help
    Thank you for looking

  10. #10
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: VBA to hide rows based on cell value


    In fact with a smart enough worksheet it's easy, even a code may be not necessary, but as you stated about a layout, better we can see it …

  11. #11
    Forum Contributor
    Join Date
    05-30-2015
    Location
    Dubai
    MS-Off Ver
    Excel 2016 Mac & PC & 365
    Posts
    633

    Re: VBA to hide rows based on cell value

    For anyone that's interested in a VBA solution, I found the following code on another site, which works great.

    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] Hide chart when I hide rows
    By L.LEE in forum Excel General
    Replies: 1
    Last Post: 08-29-2018, 03:32 AM
  2. 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
  3. [SOLVED] Hide specific Rows in Sheet1 + hide 5 more in Sheet2
    By bluesurger in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 06-02-2014, 07:19 AM
  4. [SOLVED] Hide - Un Hide rows with empty columns
    By BDF in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 04-14-2014, 02:09 PM
  5. Hide Rows with a Value (2 values to hide) then delete visible rows
    By Slea in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-19-2013, 06:25 AM
  6. Using check boxes to hide and un-hide rows with drop down lists within rows
    By Sparky_Chris in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2012, 07:22 AM
  7. HIDE ZEROS IN CHART - Hide rows of cells that equals zero
    By sweedey in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-09-2011, 08:18 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