+ Reply to Thread
Results 1 to 3 of 3

Macro to Hide Rows

  1. #1
    Registered User
    Join Date
    07-06-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2003
    Posts
    11

    Macro to Hide Rows

    Can someone help me write a macro that will hide empty rows? As you can see in the picture below, I am working on a spreadsheet to keep score for a fishing tournament. I would like a macro that will hide empty rows from cells A16 through R16, but not hide data in cells S2:U12.
    Attached Images Attached Images
    Last edited by mkoski; 04-06-2016 at 05:29 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Macro to Hide Rows

    Your request doesn't make sense:
    I would like a macro that will hide empty rows from cells A16 through R16, but not hide data in cells S2:U12.
    You can hide entire rows or entire columns, but you can't hide parts of the rows or columns. And cells A16 through R16 is one row, row 16. S2:U12 is a range/block of cells.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    04-06-2016
    Location
    Utah, USA
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1

    Re: Macro to Hide Rows

    Highlight the range of data that contains the empty rows and run the macro below.

    Sub HideRows()
    Selection.SpecialCells(xlCellTypeBlanks).Select
    Selection.EntireRow.Hidden = True
    End Sub

+ 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. Need help creating macro to hide rows based upon whether 1 of 3 rows have data
    By BigEdJr in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 01-17-2014, 02:58 PM
  2. [SOLVED] Macro to hide all rows with a zero
    By CFlack8472 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-30-2013, 09:06 AM
  3. Replies: 0
    Last Post: 05-10-2013, 12:04 PM
  4. [SOLVED] Hide rows macro
    By nickmax1 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-31-2012, 10:25 AM
  5. 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
  6. Hide Rows Macro
    By AccountantCost in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-14-2012, 01:07 AM
  7. Macro to Hide and Unhide Rows but still be able to insert rows
    By majasmi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-01-2011, 09:25 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