Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi everybody!
I got very good help that helped me to solve my initial problem in part. The programing below works well, but what if the data range goes form G2:Q36? Many thanks to all of you, Marilyne Private Sub Worksheet_Calculate() Dim Sh As Worksheet Dim MaxVal As Double Dim MaxSh As String For Each Sh In Me.Parent.Worksheets If Sh.Name < Me.Name Then If Sh.Range("G2:Q36").Value MaxVal Then MaxVal = Sh.Range("G2:Q36").Value MaxSh = Sh.Name End If End If Next Sh Select Case MaxSh Case "Phase 1" Me.Range("G2:Q36").Interior.ColorIndex = 6 Case "Phase 2" Me.Range("G2:Q36").Interior.ColorIndex = 4 Case "Phase 3" Me.Range("G2:Q36").Interior.ColorIndex = 3 Case "Phase 4" Me.Range("G2:Q36").Interior.ColorIndex = 8 End Select End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
data comparison | Excel Discussion (Misc queries) | |||
data comparison | Charts and Charting in Excel | |||
Data Comparison | Excel Discussion (Misc queries) | |||
Data comparison | Excel Worksheet Functions | |||
Data comparison | Excel Worksheet Functions |