LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Data Comparison

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Comparison Ktran Excel Worksheet Functions 1 December 2nd 09 02:27 PM
data comparison Ktran Charts and Charting in Excel 0 December 2nd 09 08:21 AM
Data comparison j jbon Excel Worksheet Functions 1 September 22nd 06 10:22 PM
Help in data comparison ansi_11111 Excel Worksheet Functions 2 June 10th 06 06:02 PM
Data comparison TonyB Excel Worksheet Functions 1 March 1st 05 04:04 PM


All times are GMT +1. The time now is 12:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"