+ Reply to Thread
Results 1 to 2 of 2

Hide values

  1. #1
    Registered User
    Join Date
    07-11-2005
    Posts
    28

    Hide values

    I am trying to hide values as found in the attached.

    Can anyone help, i have asked thi s question in a previous thread but the VB is causing me problems, and i cant quite work out why, the macro i have tried to use is present in the xls.

    Thanks in advance
    Attached Files Attached Files

  2. #2
    Bob Phillips
    Guest

    Re: Hide values

    Sub Hidecolums()
    Dim Lcolumn As Long
    Dim MyRng As Range
    Dim c As Range

    Lcolumn = Cells(25, Columns.Count).End(xlToLeft).Column
    Set MyRng = Range("C25", Cells(25, Lcolumn))

    For Each c In MyRng
    If c.Value = 0 And c.Value <> "" Then
    c.EntireColumn.Resize(, 2).Hidden = True
    End If
    Next c
    End Sub



    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "PaulOakley" <PaulOakley.25os4m_1144064400.6103@excelforum-nospam.com> wrote
    in message news:PaulOakley.25os4m_1144064400.6103@excelforum-nospam.com...
    >
    > I am trying to hide values as found in the attached.
    >
    > Can anyone help, i have asked thi s question in a previous thread but
    > the VB is causing me problems, and i cant quite work out why, the macro
    > i have tried to use is present in the xls.
    >
    > Thanks in advance
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: Summary.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=4571 |
    > +-------------------------------------------------------------------+
    >
    > --
    > PaulOakley
    > ------------------------------------------------------------------------
    > PaulOakley's Profile:

    http://www.excelforum.com/member.php...o&userid=25103
    > View this thread: http://www.excelforum.com/showthread...hreadid=529159
    >




+ 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