I have a table that contains 5 phases of a process, I'd like to have the list
of 5 phase available at the top of the spreadsheet and when you click on each
of the phases I would like the boxes that are relevant to that phase to
appear is this possible?
Antal Kerekes - 23 Feb 2007 17:46 GMT
The function you need to use is the Group feature.
Just select the rows of each phase, then go to Data › Group and Outline ›
Group.
This will do the trick.
On 2/23/07 4:16 PM, in article
DE316715-9D8A-45C7-8B78-09BDF81EFF18@microsoft.com, "Sedge"
> I have a table that contains 5 phases of a process, I'd like to have the list
> of 5 phase available at the top of the spreadsheet and when you click on each
> of the phases I would like the boxes that are relevant to that phase to
> appear is this possible?
JE McGimpsey - 24 Feb 2007 09:48 GMT
> I have a table that contains 5 phases of a process, I'd like to have the list
> of 5 phase available at the top of the spreadsheet and when you click on each
> of the phases I would like the boxes that are relevant to that phase to
> appear is this possible?
In addition to Antal's Group and Outline suggestion, you could use
macros to hide/unhide columns and rows when certain cells are selected.
I'd suggest using a double click, as the click/selection event is fired
when using the arrow keys, tab, return, etc.
Perhaps you could modify something like this (put it in the worksheet
code module: CTRL-click the worksheet tab and choose View Code):
Assuming A1:E1 contain the 5 phases:
Private Sub Worksheet_BeforeDoubleClick( _
ByVal Target As Excel.Range, Cancel As Boolean)
With Target
If Not Intersect(Range("A1:E1"), .Cells) Is Nothing Then
Rows("3:" & Me.Rows.Count).Hidden = True
Select Case .Column
Case 1
Rows("4:10").Hidden = False
Case 2
Rows("12:16").Hidden = False
Case 3
Rows("18:24").Hidden = False
Case 4
Rows("26:40").Hidden = False
Case Else
Rows("42:50").Hidden = False
End Select
End If
End With
End Sub