Results 1 to 4 of 4

Hiding worksheets based on cell result

Threaded View

  1. #1
    Registered User
    Join Date
    10-02-2003
    Location
    East Midlands, UK
    MS-Off Ver
    MS Office Professional Plus 2016
    Posts
    40

    Hiding worksheets based on cell result

    I have the following worksheets in Excel 2003:

    Who Are You
    Your Info Needs
    Managing Records
    Info Access & Retrieval
    FOI, EIR & DPA
    Other Comments

    They form a questionnaire about information management FYI. I have a routine that totals what percentage of each sheet is completed. Using an if statement, I then assign a value of 0.166666666666666 to that sheet, and from there can calculate what percentage of the workbook is complete (0.166666666666666% * 6 =100%)

    I would like to hide all but the first sheet until the 0.166666666666666 is achieved on that first sheet, then all but the first and the second until the 0.166666666666666 is achieved on the second and so on - i.e. until each sheet is completed, all subsequent sheets are hidden.

    Can I adapt the following for hiding rows to sort this? If so, how?

    Private Sub Worksheet_Change(ByVal Target As Range)
    Set Target = Range("C5") 
    If Target.Value = "No" Then
    Target.Offset(1, 0).EntireRow.Hidden = True  
    ElseIf Target.Value = "Yes" Then
    Target.Offset(1, 0).EntireRow.Hidden = False 
    End If
    Thanks for taking a look.
    Last edited by VBA Noob; 12-19-2006 at 04:23 PM.

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