+ Reply to Thread
Results 1 to 5 of 5

Auto hide blank rows

  1. #1
    Forum Contributor
    Join Date
    09-04-2013
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    122

    Auto hide blank rows

    Workbook attached

    I'm trying to build a products database, which does not need to be very sophisticated to be honest. I have separate sheets for separate sub categories and i want to update this as new products arise, no problem. Occasionally I am required to provide a product index of specific products supplied on a specific project.

    Before today, i had all of my 'sub categories' on one sheet from top to bottom and would simply hide all the rows that were either blank or did not contain a product that was used on a job, i would then print the remaining rows to create the bespoke project index before 'un-hiding' the rows. This has proved rather long winded.

    What i would like to do, if its even possible, is work my way through the sub categories sheets marking column E with an "x" or tick or "yes" if the product is to be included in the print copy and then once i've worked through all the sub categories sheets 'ticking' or marking all the appropriate products i can 'activate' the print copy sheet and it will auto populate the rows/ hide all unnecessary rows etc leaving me with a full list or index of only the products actually used. where this might get even trickier is that i need labelled 'dividing' rows between sub categories (shown in the workbook).

    I've begun working on this and tried to do this using some code (in the O&M print copy sheet) but it doesnt bunch up the data and leaves blank rows plus i don't know how to adapt the ranges either side of my 'dividing rows'.

    Am i missing something? or is this simply not possible to achieve?

    Your thoughts or advice is greatly recieved. xProduct index Master Forum example.xlsm

  2. #2
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Auto hide blank rows

    Do you still need assistance with this? If so, I have a question: Do you want the O&M Copy sheet sections to automatically adjust when parts are added to or deleted from the source sheets?
    Acts 4:12
    Salvation is found in no one else, for there is no other name under heaven given to mankind by which we must be saved.

  3. #3
    Registered User
    Join Date
    01-28-2014
    Location
    Schenectady, NY
    MS-Off Ver
    Office 365
    Posts
    65

    Re: Auto hide blank rows

    Put this code on your worksheet:
    Please Login or Register  to view this content.
    Put this code in a module:

    Please Login or Register  to view this content.
    ON the worksheet you're "ticking" off on, you'll need some sort of counter, like =Countif(Y:Y,"X"). In your "Z" column (you may need to adjust these), you'll need to determine "Unhide" range and "Hide" range. Unhide can be a static total range of your worksheet (like A1:A100). Your hide range will be dynamic, like ="A"&Z4&":A100" where Z4 = your count of x's + however many rows you need for headers.

    Hope this makes sense. I just built something VERY similar.

  4. #4
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Auto hide blank rows

    Put this in your worksheet area of the code:

    Please Login or Register  to view this content.
    Write in any cell in row 1 (for example in D1) the word "Clear" and double click it.
    In column E, a bunch of 'checkboxes' will appear - double click them to toggle them.
    Write in any cell in row 1 (for example in E1) the word "Filter" and double click it.
    Only the 'checked' boxes will remain and the word 'Filter' changes to 'Unfilter'. Guess what that does :-)

    Enjoy.
    Last edited by JasperD; 04-13-2015 at 03:25 PM.
    Please click the * below if this helps

  5. #5
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Auto hide blank rows

    Please try the following:
    1. In each parts sheet, select cell A1 and under Alignment, unselect Wrap Text (needed for proper formatting by the code).
    2. Delete any worksheets other than the parts sheets and the product index sheet. If this is not desirable, a code adjustment will be needed.
    3. Replace the product index Worksheet_Activate code with the following:

    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. Can I auto-hide rows or auto-set row height?
    By Hambone70 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-03-2014, 01:25 AM
  2. Can I auto-hide rows or auto-set row height?
    By Hambone70 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-27-2014, 05:59 AM
  3. Can I auto-hide rows or auto-set row height?
    By Hambone70 in forum Excel General
    Replies: 2
    Last Post: 06-27-2014, 02:59 AM
  4. auto hide a row if the value of a cell is blank on a specific sheet.
    By russ8420 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-27-2012, 02:13 PM
  5. Hide Blank rows
    By Charity in forum Excel General
    Replies: 15
    Last Post: 11-23-2006, 08:20 AM

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