Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-17-2012, 07:33 AM
YounesB3 YounesB3 is offline Hide Rows Windows XP Hide Rows Office 2010 32bit
Advanced Beginner
Hide Rows
 
Join Date: Jul 2012
Posts: 37
YounesB3 is on a distinguished road
Default Hide Rows

Hello everyone, I had a superb macro working before:



Code:
Sub HideRows()
Intersect(Range("Range1").SpecialCells(xlCellTypeBlanks).EntireRow, _
Range("Range2").SpecialCells(xlCellTypeBlanks).EntireRow) _
.EntireRow.Hidden = True
Intersect(Range("Range3").SpecialCells(xlCellTypeBlanks).EntireRow, _
Range("Range4").SpecialCells(xlCellTypeBlanks).EntireRow) _
.EntireRow.Hidden = True
Intersect(Range("Range5").SpecialCells(xlCellTypeBlanks).EntireRow, _
Range("Range6").SpecialCells(xlCellTypeBlanks).EntireRow) _
.EntireRow.Hidden = True
Intersect(Range("Range7").SpecialCells(xlCellTypeBlanks).EntireRow, _
Range("Range8").SpecialCells(xlCellTypeBlanks).EntireRow) _
.EntireRow.Hidden = True
Intersect(Range("Range9").SpecialCells(xlCellTypeBlanks).EntireRow, _
Range("Range10").SpecialCells(xlCellTypeBlanks).EntireRow) _
.EntireRow.Hidden = True
End Sub
This would hide rows of 5 different tab in a worksheet between 2 columns. The problem is, I now had to put some formulas to automate the file and the macro doesn't work anymore even if the value in the cell = "". Is it possible to change the above code to work for cells which are either blank or = ""?

Thanks a lot!

Note: Cross-posted in mrexcel (posted yesterday), but no answer so far.
Reply With Quote
  #2  
Old 10-26-2012, 07:42 PM
macropod's Avatar
macropod macropod is offline Hide Rows Windows 7 64bit Hide Rows Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,375
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Your description suggests the cells with the "" now have a formula generating that result. Correct?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 10-29-2012, 05:40 AM
YounesB3 YounesB3 is offline Hide Rows Windows XP Hide Rows Office 2010 32bit
Advanced Beginner
Hide Rows
 
Join Date: Jul 2012
Posts: 37
YounesB3 is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
Your description suggests the cells with the "" now have a formula generating that result. Correct?
Indeed, but I've solved the issue with a simple filter. Thxs
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide Rows Hide Rows and Update Chart based on cell value ubns Excel Programming 5 05-07-2012 05:44 AM
Hide Rows merging rows and creating sub-rows gib65 Excel 2 12-09-2011 02:09 PM
Temporarily show/hide selected table rows glricht Word Tables 0 12-29-2009 05:40 AM
Hide Rows Hide a combo box DrewB Word 3 06-08-2009 11:29 PM
Conditional Formatting to Hide Rows or Columns? sczegus Excel 0 09-26-2006 04:17 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:13 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft