View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
keyson2004 keyson2004 is offline
external usenet poster
 
Posts: 4
Default MACRO TO HIDE BLANK ROWS

Hi Thanks for this. How do move to the next cell until it finds anonther cell
("") ??

"Gary''s Student" wrote:

Sub hideum()
Set r = Range("C2:C192")
For i = 1 To 192
If Cells(i, "C").Value = "" Then
Rows(i).Hidden = True
End If
Next
End Sub

--
Gary''s Student - gsnu200819


"keyson2004" wrote:

I have developed a model that has 190 lines but certain cells are blank ie
(-) and i would like to hide that row were a certain cell is blank. How do I
write code for the macro to start at say C1 and then move down to C2 etc and
then when it finds a cell that is blank ( but contains a lookup formula) it
will hide that row and then continue until say come to c192 which contains
the word END. Can anybody help me please.