Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Conditional macro to hide rows

I have a worksheet containing employee ID numbers and hours worked on each
job. I need help with a macro to hide all rows on the worksheet that have
zero hours for any job.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Conditional macro to hide rows

Why not just filter on values < 0?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Rob" wrote in message
...
try:
with Range("your range")
for each cell in .columns(3) 'column within the range with the hours
if cell=0 then
cell.entirerow.hidden=true
else
cell.entirerow.hidden=false
end if
next
end with



"cher" wrote:

I have a worksheet containing employee ID numbers and hours worked on

each
job. I need help with a macro to hide all rows on the worksheet that

have
zero hours for any job.



Reply
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 code to hide rows and not calculate hidden rows bradmcq Excel Discussion (Misc queries) 0 September 1st 09 12:38 AM
Using VBA to Conditional Hide Rows? PBJ Excel Discussion (Misc queries) 1 February 16th 07 06:54 PM
Conditional macro to hide rows Rob Excel Programming 0 April 21st 05 05:39 PM
Conditional Hide/Unhide Rows Gwen H Excel Discussion (Misc queries) 4 March 30th 05 06:52 AM
Conditional Hide rows with zero Vlookup help Excel Programming 2 February 4th 05 09:41 PM


All times are GMT +1. The time now is 11:44 PM.

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

About Us

"It's about Microsoft Excel"