View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
excelent excelent is offline
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!