Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default how can i set more than three conditional formats to xl worksheet

I am trying to set up a sheet showing recurring staff absences. i can only do
Conditional Formats three times on one sheet. With more than three types of
absence I would like to know if ther is a way to increase the number of
Conditional Formats I can make
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 74
Default how can i set more than three conditional formats to xl worksheet

Andy,

You can only get more than 4 in code (as far as I am aware - 4 not 3 as
there is the default no formatting).

You add code to the code module of the worksheet. The following example
would assume that you had put the cells you wanted conditionally formatted in
a named range called 'conditional' & does a basic background colour change
based on the values.

Private Sub Worksheet_Change(ByVal Target As Range)

Dim ranCell As Excel.Range

For Each ranCell In Application.Intersect(Target, Me.Range("conditional"))

With ranCell
Select Case .Value

Case 1

.Interior.Color = vbBlue

Case 2

.Interior.Color = vbYellow

Case 3

.Interior.Color = vbRed

Case 4

.Interior.Color = vbGreen

End Select

End With

Next ranCell

End Sub

Regards,

Chris.

--
Chris Marlow
MCSD.NET, Microsoft Office XP Master


"Andy A112" wrote:

I am trying to set up a sheet showing recurring staff absences. i can only do
Conditional Formats three times on one sheet. With more than three types of
absence I would like to know if ther is a way to increase the number of
Conditional Formats I can make

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default how can i set more than three conditional formats to xl worksheet

Would 30 be enough?

Bob Phillips' site has a downloadable free add-in called CFPlus which does this.

http://www.xldynamic.com/source/xld.....Download.html


Gord Dibben MS Excel MVP

On Wed, 9 Aug 2006 08:58:03 -0700, Andy A112 <Andy
wrote:

I am trying to set up a sheet showing recurring staff absences. i can only do
Conditional Formats three times on one sheet. With more than three types of
absence I would like to know if ther is a way to increase the number of
Conditional Formats I can make


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
Copying all formats from worksheet to worksheet Gary Excel Worksheet Functions 1 January 11th 06 05:18 PM
Number of Conditional Formats Jason Wiley Excel Worksheet Functions 1 June 17th 05 12:39 AM
list all conditional formats Dave Breitenbach Excel Worksheet Functions 1 May 23rd 05 07:29 PM
Automatic updating of Conditional Formats using dates MAD Excel Worksheet Functions 5 May 3rd 05 04:44 AM
copy worksheet (keeping formats) Ken New Users to Excel 3 February 16th 05 04:37 PM


All times are GMT +1. The time now is 06:36 AM.

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"