Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 20
Default How many conditions can I apply to a cell? I need to apply 8.

I have a annual leave spreadsheet where I want the user to enter a number
from 1-8 which will change the colour of the cell. Is this possible? How many
conditions can I apply to a cell? I need to apply 8.

Thanks in advance

Markus
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default How many conditions can I apply to a cell? I need to apply 8.

Hi,

One way. Right click your sheet tab, view code and paste this in. Play with
the colours to get what you require.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub
If Target.Address = "$A$1" Then
Select Case Target.Value
Case Is = 1
icolour = 3
Case Is = 2
icolour = 4
Case Is = 3
icolour = 5
Case Is = 4
icolour = 6
Case Is = 5
icolour = 7
Case Is = 6
icolour = 8
Case Is = 7
icolour = 9
Case Is = 8
icolour = 10
Case Else
icolour = xlNone
End Select
Target.Interior.ColorIndex = icolour

End If
End Sub

Mike

"Markus" wrote:

I have a annual leave spreadsheet where I want the user to enter a number
from 1-8 which will change the colour of the cell. Is this possible? How many
conditions can I apply to a cell? I need to apply 8.

Thanks in advance

Markus

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default How many conditions can I apply to a cell? I need to apply 8.

With Excel 2003, only 3 conditions (plus the base formatting).
If you want more than that, either Excel 2007 or VBA
http://www.ozgrid.com/VBA/excel-cond...ting-limit.htm
--
David Biddulph

"Markus" wrote in message
...
I have a annual leave spreadsheet where I want the user to enter a number
from 1-8 which will change the colour of the cell. Is this possible? How
many
conditions can I apply to a cell? I need to apply 8.

Thanks in advance

Markus



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
How to apply a name to a cell range Stephen Francis M Excel Discussion (Misc queries) 15 January 7th 08 10:35 AM
Adding today's date if certain conditions apply Daniel Lapin Excel Worksheet Functions 1 January 29th 07 06:52 PM
How to apply more than one IF condition in 1 cell Cesar Excel Discussion (Misc queries) 1 December 18th 05 12:18 PM
Summing if several conditions apply [email protected] Excel Worksheet Functions 3 December 1st 05 04:52 PM
Making comments apply to more than one cell Evelyn Excel Discussion (Misc queries) 2 February 9th 05 12:08 AM


All times are GMT +1. The time now is 07:09 AM.

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"