View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gunnar Johansson[_6_] Gunnar Johansson[_6_] is offline
external usenet poster
 
Posts: 2
Default Doesn't work as it SHOULD .. Rows.Hidden /with SpecialCells

Hello genious,

I have a problem. I want to show the rows where a formula in A:A make a
number instead of "". I want to do this in the range with name
"rngname_rows" but always want to show the rows 6, 209, 412 and 615 within
the named range. Here is what I try to do:

Sub ShowNumRows

Rows.Hidden = False
Range("RNGNAME_ROWS").SpecialCells(xlCellTypeFormu las, 1).Rows.Hidden =
False
Application.Union(Rows(6), Rows(209), Rows(412), Rows(615)).EntireRow.Hidden
= False

End Sub


To test the parts:
Selecting right rows work fine with:
Range("RNGNAME_ROWS").SpecialCells(xlCellTypeFormu las, 1).Rows.Select
Application.Union(Rows(6), Rows(209), Rows(412), Rows(615)).Rows.Select

Why doesn't it work with hiding all cells and then just show the one I want?
What can I do?

Please help me,

I really can't see what is wrong!

/Gunnar