Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 70
Default More than 3 Conditions

Hi, I am looking for a code which will do the following for me

Range is T5:T90
Condition 1: If Cell value is 10 make background light blue
Condition 2: If cell value is between -10% and -20% make background yellow
Condition 3: If cell value is < -20% make background red
Condition 4: If cell value is < 10% but 0% make background green.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 896
Default More than 3 Conditions

Excel 2003

Sub cus
Dim cell as Range

For Each cell in Range("T5:T90").Cells
If cell.Value10 Then
cell.Interior.ColorIndex = 8
Elseif cell.Value=20% and cell.Value=<10% Then
cell.Interior.ColorIndex = 6
Elseif cell.Value<20% Then
cell.Interior.ColorIndex = 3
Elseif cell.Value0 and cell.Value<10% Then
cell.Interior.ColorIndex = 50
End If
Next cell

End Sub

On 20 Lis, 14:31, John Moore
wrote:
Hi, I am looking for a code which will do the following for me

Range is T5:T90
Condition 1: If Cell value is 10 make background light blue
Condition 2: If cell value is between -10% and -20% make background yellow
Condition 3: If cell value is < -20% make background red
Condition 4: If cell value is < 10% but 0% make background green.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default More than 3 Conditions

Since your conditions cover all possible values of the cells you can "fake"
the 4th condition. Set conditional formats for condtions 2, 3, and 4. Make
the natrual fill color of the cells light blue.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"John Moore" wrote:

Hi, I am looking for a code which will do the following for me

Range is T5:T90
Condition 1: If Cell value is 10 make background light blue
Condition 2: If cell value is between -10% and -20% make background yellow
Condition 3: If cell value is < -20% make background red
Condition 4: If cell value is < 10% but 0% make background green.


Reply
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
Countif Conditions - Use of conditions that vary by cell value JonTarg Excel Discussion (Misc queries) 1 May 30th 08 01:21 PM
2 Conditions + Sum of a colum matching those conditions Jeffa Excel Worksheet Functions 5 June 8th 07 12:14 AM
shade cells based on conditions - i have more than 3 conditions Mo2 Excel Worksheet Functions 3 March 30th 07 07:19 AM
IF conditions Ken Knight Excel Discussion (Misc queries) 5 June 6th 06 02:14 PM
How to multiple conditions to validate more than 2 conditions to . Bhuvana Govind Excel Worksheet Functions 1 January 28th 05 07:07 PM


All times are GMT +1. The time now is 08:44 PM.

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

About Us

"It's about Microsoft Excel"