+ Reply to Thread
Results 1 to 3 of 3

Doesn't work as it SHOULD .. Rows.Hidden /with SpecialCells

  1. #1
    Gunnar Johansson
    Guest

    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(xlCellTypeFormulas, 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(xlCellTypeFormulas, 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



  2. #2
    Bob Phillips
    Guest

    Re: Doesn't work as it SHOULD .. Rows.Hidden /with SpecialCells

    Range("RNGNAME_ROWS").SpecialCells(xlCellTypeFormulas, 1).EntireRow.Hidden =
    False


    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "Gunnar Johansson" <GuJo_57@hotmail.com> wrote in message
    news:OXGFGKRPGHA.3556@TK2MSFTNGP10.phx.gbl...
    > 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(xlCellTypeFormulas, 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(xlCellTypeFormulas, 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
    >
    >




  3. #3
    Gunnar Johansson
    Guest

    No, doesn't matter if it is "EntireRow" or "Rows"

    No, it doesn't matter

    /regards Gunnar

    "Bob Phillips" <bob.phillips@notheretiscali.co.uk> skrev i meddelandet
    news:uTOPtSRPGHA.3100@TK2MSFTNGP11.phx.gbl...
    > Range("RNGNAME_ROWS").SpecialCells(xlCellTypeFormulas, 1).EntireRow.Hidden
    > =
    > False
    >
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (remove nothere from email address if mailing direct)
    >
    > "Gunnar Johansson" <GuJo_57@hotmail.com> wrote in message
    > news:OXGFGKRPGHA.3556@TK2MSFTNGP10.phx.gbl...
    >> 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(xlCellTypeFormulas, 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(xlCellTypeFormulas, 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
    >>
    >>

    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1