LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 896
Default Macro to hide rows based on criteria

Mike is right
an empty cell will been as '0', so I have to adjust my macro

Sub hideeeee()
On Error Resume Next
For Each cell In Selection
If IsNumeric(cell) And cell.Offset(0, 4) = 0 And cell.Offset(0, 5) = 0
_
And Len(cell.Offset(0, 4)) 0 And Len(cell.Offset(0, 5) 0 Then
cell.Rows.EntireRow.Hidden = True
End If
Next cell

End Sub

sorry
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to show/hide rows based on a range of dates Eric F. Excel Programming 0 June 2nd 08 06:00 PM
Macro to Hide rows based on value of column F Scott Marcus Excel Discussion (Misc queries) 10 October 27th 06 11:57 PM
Macro to hide and unhide based on criteria [email protected] Excel Discussion (Misc queries) 1 June 5th 06 08:05 PM
Macro to hide rows based on a zero value in a particular cell Peter Excel Programming 2 July 29th 04 03:19 AM
macro to hide rows based on formula? Scott T. Lindner Excel Programming 5 October 20th 03 01:40 PM


All times are GMT +1. The time now is 06:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"