Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
KBV KBV is offline
external usenet poster
 
Posts: 2
Default Hiding rows that meet multiple conditions in excel

This is my first time writing a VBA code (custom module). I want to learn how
to write a code that will ask excel to hide rows where a specific criteriia
is met. For ex, " hide all rows where col C has the words 'network' in it".

Or, can I write an if statement in excel to do this??

Thank you!

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 695
Default Hiding rows that meet multiple conditions in excel

Sub tst()

r = Cells(65500, 3).End(xlUp).Row
For t = 1 To r
If Cells(t, 3) = "network" Then
Cells(t, 3).EntireRow.Hidden = True
End If
Next

End Sub



"KBV" skrev:

This is my first time writing a VBA code (custom module). I want to learn how
to write a code that will ask excel to hide rows where a specific criteriia
is met. For ex, " hide all rows where col C has the words 'network' in it".

Or, can I write an if statement in excel to do this??

Thank you!

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
(Unsuccessfully!) Unhiding Rows in Excel 2003 [email protected] Excel Worksheet Functions 6 May 24th 06 08:17 PM
how to copy multiple Excel files from Outlook into Excel??? Brainless_in_Boston Excel Discussion (Misc queries) 0 February 24th 06 04:46 PM
Can Excel "slide up" rows with content thru empty rows to condense portly44 Excel Worksheet Functions 2 April 1st 05 12:47 AM
How do I stop an Excel sheet from automatically hiding rows when . kazyreed Excel Worksheet Functions 1 February 3rd 05 04:35 PM
Sum with multiple conditions in Excel 2000 Magnus Oskarsson Excel Worksheet Functions 2 December 16th 04 05:09 PM


All times are GMT +1. The time now is 03:46 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"