Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 386
Default Conditional Format

Hi,

Is there any way to extend a conditional format to greater than three
conditions? I need five.

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Conditional Format

Hi,

One way is to tilise the worksheet change event and select case.

Right click your sheet tab, view code and paste this in which currently
works on A1 change the vauluse and colours to suit

Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Range("A1").Value
Case Is = 1
icolor = 6
Case Is = 2
icolor = 9
Case Is = 3
icolor = 12
Case Is = 5
icolor = 15
Case Is = 6
icolor = 22
Case Else
icolor = xlNone
End Select
Range("A1").Interior.ColorIndex = icolor
End Sub

Mike

"LiAD" wrote:

Hi,

Is there any way to extend a conditional format to greater than three
conditions? I need five.

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Conditional Format

Excel 2007, or VBA.
--
David Biddulph

"LiAD" wrote in message
...
Hi,

Is there any way to extend a conditional format to greater than three
conditions? I need five.

Thanks



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 386
Default Conditional Format

Thanks,

Works fine for A1 but how do i extend the range? Sorry I know zero on VB.

Thanks

"Mike H" wrote:

Hi,

One way is to tilise the worksheet change event and select case.

Right click your sheet tab, view code and paste this in which currently
works on A1 change the vauluse and colours to suit

Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Range("A1").Value
Case Is = 1
icolor = 6
Case Is = 2
icolor = 9
Case Is = 3
icolor = 12
Case Is = 5
icolor = 15
Case Is = 6
icolor = 22
Case Else
icolor = xlNone
End Select
Range("A1").Interior.ColorIndex = icolor
End Sub

Mike

"LiAD" wrote:

Hi,

Is there any way to extend a conditional format to greater than three
conditions? I need five.

Thanks

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 386
Default Conditional Format

Sorry should have said its 2003 and I need the range to go horizontal not
vertical.

Thanks

"LiAD" wrote:

Thanks,

Works fine for A1 but how do i extend the range? Sorry I know zero on VB.

Thanks

"Mike H" wrote:

Hi,

One way is to tilise the worksheet change event and select case.

Right click your sheet tab, view code and paste this in which currently
works on A1 change the vauluse and colours to suit

Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Range("A1").Value
Case Is = 1
icolor = 6
Case Is = 2
icolor = 9
Case Is = 3
icolor = 12
Case Is = 5
icolor = 15
Case Is = 6
icolor = 22
Case Else
icolor = xlNone
End Select
Range("A1").Interior.ColorIndex = icolor
End Sub

Mike

"LiAD" wrote:

Hi,

Is there any way to extend a conditional format to greater than three
conditions? I need five.

Thanks



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 386
Default Conditional Format

Using 2003.

Solution wise I dont mind if it has to be VBA, just means I won't understand
a sausage. I can sort of understand the programs that others write but can't
even get close to doing one myself.

Thanks

"David Biddulph" wro

Excel 2007, or VBA.
--
David Biddulph

"LiAD" wrote in message
...
Hi,

Is there any way to extend a conditional format to greater than three
conditions? I need five.

Thanks




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Conditional Format

Hi,

This now works for row 1

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Not Intersect(Target, Rows(1)) Is Nothing Then
Select Case Target.Value
Case Is = 1
icolor = 6
Case Is = 2
icolor = 9
Case Is = 3
icolor = 12
Case Is = 4
icolor = 15
Case Is = 5
icolor = 22
Case Else
icolor = xlNone
End Select
Target.Interior.ColorIndex = icolor
End If
End Sub

"LiAD" wrote:

Sorry should have said its 2003 and I need the range to go horizontal not
vertical.

Thanks

"LiAD" wrote:

Thanks,

Works fine for A1 but how do i extend the range? Sorry I know zero on VB.

Thanks

"Mike H" wrote:

Hi,

One way is to tilise the worksheet change event and select case.

Right click your sheet tab, view code and paste this in which currently
works on A1 change the vauluse and colours to suit

Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Range("A1").Value
Case Is = 1
icolor = 6
Case Is = 2
icolor = 9
Case Is = 3
icolor = 12
Case Is = 5
icolor = 15
Case Is = 6
icolor = 22
Case Else
icolor = xlNone
End Select
Range("A1").Interior.ColorIndex = icolor
End Sub

Mike

"LiAD" wrote:

Hi,

Is there any way to extend a conditional format to greater than three
conditions? I need five.

Thanks

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 386
Default Conditional Format

Seems to work perfectly

thankyou

"Mike H" wrote:

Hi,

This now works for row 1

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Not Intersect(Target, Rows(1)) Is Nothing Then
Select Case Target.Value
Case Is = 1
icolor = 6
Case Is = 2
icolor = 9
Case Is = 3
icolor = 12
Case Is = 4
icolor = 15
Case Is = 5
icolor = 22
Case Else
icolor = xlNone
End Select
Target.Interior.ColorIndex = icolor
End If
End Sub

"LiAD" wrote:

Sorry should have said its 2003 and I need the range to go horizontal not
vertical.

Thanks

"LiAD" wrote:

Thanks,

Works fine for A1 but how do i extend the range? Sorry I know zero on VB.

Thanks

"Mike H" wrote:

Hi,

One way is to tilise the worksheet change event and select case.

Right click your sheet tab, view code and paste this in which currently
works on A1 change the vauluse and colours to suit

Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Range("A1").Value
Case Is = 1
icolor = 6
Case Is = 2
icolor = 9
Case Is = 3
icolor = 12
Case Is = 5
icolor = 15
Case Is = 6
icolor = 22
Case Else
icolor = xlNone
End Select
Range("A1").Interior.ColorIndex = icolor
End Sub

Mike

"LiAD" wrote:

Hi,

Is there any way to extend a conditional format to greater than three
conditions? I need five.

Thanks

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Conditional Format

glad i could help

"LiAD" wrote:

Seems to work perfectly

thankyou

"Mike H" wrote:

Hi,

This now works for row 1

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Not Intersect(Target, Rows(1)) Is Nothing Then
Select Case Target.Value
Case Is = 1
icolor = 6
Case Is = 2
icolor = 9
Case Is = 3
icolor = 12
Case Is = 4
icolor = 15
Case Is = 5
icolor = 22
Case Else
icolor = xlNone
End Select
Target.Interior.ColorIndex = icolor
End If
End Sub

"LiAD" wrote:

Sorry should have said its 2003 and I need the range to go horizontal not
vertical.

Thanks

"LiAD" wrote:

Thanks,

Works fine for A1 but how do i extend the range? Sorry I know zero on VB.

Thanks

"Mike H" wrote:

Hi,

One way is to tilise the worksheet change event and select case.

Right click your sheet tab, view code and paste this in which currently
works on A1 change the vauluse and colours to suit

Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Range("A1").Value
Case Is = 1
icolor = 6
Case Is = 2
icolor = 9
Case Is = 3
icolor = 12
Case Is = 5
icolor = 15
Case Is = 6
icolor = 22
Case Else
icolor = xlNone
End Select
Range("A1").Interior.ColorIndex = icolor
End Sub

Mike

"LiAD" wrote:

Hi,

Is there any way to extend a conditional format to greater than three
conditions? I need five.

Thanks

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
New Conditional Format Overriding Previous Conditional Format Rene Excel Discussion (Misc queries) 3 February 27th 08 06:08 PM
How to create a conditional format that changes the number format tmbo Excel Discussion (Misc queries) 1 August 23rd 06 06:20 AM
Conditional Format - Format Transfer To Chart ju1eshart Excel Discussion (Misc queries) 0 June 1st 06 02:46 PM
copy conditional format to regular format GDC Setting up and Configuration of Excel 3 May 4th 05 09:35 PM
copy conditional format as ACTUAL format Dana Zulager Excel Discussion (Misc queries) 7 December 7th 04 11:02 PM


All times are GMT +1. The time now is 02:23 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"