Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi everybody!
I will try to explain my problem as clearly as possible I have a file with 4 different sheets. Sheet Resume, Phase 1, Phase 2, Phase 3 and Phase 4. I want to compare data from sheet 1 to 4 (same cells) ex. 1 (G10) 2 (G10) 3 (G10)... and change the background color on the sheet Resume (G10 which add value of cells G10 from sheet 1 to 4) depending on the highest value. If the highest value is on Sheet 1 - Background is Yellow, if the highest value is on sheet 2 - Background is light blue ... Here's the formula I am using, but its not working an I don't know why.. Private Sub Worksheet_Calculate( x = [max('Phase 1:Phase 4'!G10) x1 = ['Phase 1'!G10 x2 = ['Phase 2'!G10 x3 = ['Phase 3'!G10 x4 = ['Phase 4'!G10 y = "{" & x1 & "," & x2 & "," & x3 & "," & x4 & "} Select Case Evaluate("Match(" & x & "," & y & ", 0)" Case 1 'le Max est dans "Phase 1 [G10].Interior.ColorIndex = Case 2 'le Max est dans "Phase 2 [G10].Interior.ColorIndex = Case 3 'le Max est dans "Phase 3 [G10].Interior.ColorIndex = Case 4 'le Max est dans "Phase 4 [G10].Interior.ColorIndex = End Selec End Su thank you very much for your help.. Marilyne |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Data Comparison | Excel Worksheet Functions | |||
data comparison | Charts and Charting in Excel | |||
Data comparison | Excel Worksheet Functions | |||
Help in data comparison | Excel Worksheet Functions | |||
Data comparison | Excel Worksheet Functions |