+ Reply to Thread
Results 1 to 2 of 2

Hide all values in a row if value is 0

  1. #1
    Erik T
    Guest

    Hide all values in a row if value is 0

    I am putting together a forecast sheet for part requirements and with so many
    parts to deal with I would like to set it up so that anytime the required
    amount is 0, then the entire row is hidden. Currently I have a simple formula
    to just show a blank cell. It is time consuming to review 300 P/N when I may
    only need 14 P/N that week. How can I go about hidding the entire row in a
    formula?

    Thank you,

    Erik

  2. #2
    Otto Moehrbach
    Guest

    Re: Hide all values in a row if value is 0

    You can't. Not with a formula. A formula will only return a value. You
    will have to use VBA to hide the rows.
    I assume that the required amount is in some column from this row to that
    row. Is that correct? If so, then you can use something like this:
    Say that Column F holds the amounts.
    Sub HideRows()
    Dim TheRng As Range
    Dim i As Range
    Set TheRng = Range("F2", Range("F" & Rows.Count).End(xlUp))
    For Each i In TheRng
    If i.Value = 0 Then i.EntireRow.Hidden = True
    Next i
    End Sub
    HTH Otto

    "Erik T" <[email protected]> wrote in message
    news:[email protected]...
    >I am putting together a forecast sheet for part requirements and with so
    >many
    > parts to deal with I would like to set it up so that anytime the required
    > amount is 0, then the entire row is hidden. Currently I have a simple
    > formula
    > to just show a blank cell. It is time consuming to review 300 P/N when I
    > may
    > only need 14 P/N that week. How can I go about hidding the entire row in a
    > formula?
    >
    > Thank you,
    >
    > Erik




+ 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