#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Formatting in Excel

Hi Guys,

I have set up some conditional formatting in excel, and it colours cells
depending on date formats i have set. However, does anyone know whether it is
possible to also colour the tabs of each worksheet if one of the rules from
conditional formatting is met. For example, if the cell turns red according
to the rules i have set in conditional formatting i also want the tab to turn
red- is this possible?

Cheers,
Rodney
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Formatting in Excel

Hi,

There are ways of doing this directly i.e actualy testing the conditional
format and you can see that he-

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

However if your requirement is as simple as looking at one cell and
colouring the sheet tab then here's another way.

Say you have a simple conditional format that turns A1 red if it's 5. You
can utilise the worksheet change event to check the cells value and colour
the tab. Right click the worksheet tab, view code and paste this in. It
simply checks the same condition the conditional format is testing for and
colours the tab.

Private Sub Worksheet_Change(ByVal Target As Range)
If Cells(1, 1).Value 5 Then
Sheets("Sheet1").Tab.ColorIndex = 3
Else
Sheets("Sheet1").Tab.ColorIndex = -4142
End If
End Sub

Mike

"Rodney" wrote:

Hi Guys,

I have set up some conditional formatting in excel, and it colours cells
depending on date formats i have set. However, does anyone know whether it is
possible to also colour the tabs of each worksheet if one of the rules from
conditional formatting is met. For example, if the cell turns red according
to the rules i have set in conditional formatting i also want the tab to turn
red- is this possible?

Cheers,
Rodney

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Formatting in Excel

Hi,

I should have added this is a long way from being bullet proof. If for
example your cell changes value because of a change on another sheet then the
recalculation of A1 doesn't call the sheet change event and it fails.

Mike


"Mike H" wrote:

Hi,

There are ways of doing this directly i.e actualy testing the conditional
format and you can see that he-

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

However if your requirement is as simple as looking at one cell and
colouring the sheet tab then here's another way.

Say you have a simple conditional format that turns A1 red if it's 5. You
can utilise the worksheet change event to check the cells value and colour
the tab. Right click the worksheet tab, view code and paste this in. It
simply checks the same condition the conditional format is testing for and
colours the tab.

Private Sub Worksheet_Change(ByVal Target As Range)
If Cells(1, 1).Value 5 Then
Sheets("Sheet1").Tab.ColorIndex = 3
Else
Sheets("Sheet1").Tab.ColorIndex = -4142
End If
End Sub

Mike

"Rodney" wrote:

Hi Guys,

I have set up some conditional formatting in excel, and it colours cells
depending on date formats i have set. However, does anyone know whether it is
possible to also colour the tabs of each worksheet if one of the rules from
conditional formatting is met. For example, if the cell turns red according
to the rules i have set in conditional formatting i also want the tab to turn
red- is this possible?

Cheers,
Rodney

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
"Excel encountered an error and had to remove some formatting toavoid corrupting the workbook. Please re-check your formatting carefully." Greg Lovern Excel Discussion (Misc queries) 0 July 18th 08 09:42 PM
Formatting cells in a column with conditional formatting? shamor Excel Discussion (Misc queries) 8 May 19th 08 10:11 PM
Saving Excel 2007 conditional formatting in Excel 2003 format [email protected] Excel Discussion (Misc queries) 0 March 28th 08 06:42 AM
Protect Cell Formatting including Conditional Formatting Mick Jennings Excel Discussion (Misc queries) 5 November 13th 07 05:32 PM
expanding custom formatting without removing existing cell formatting? Keith Excel Worksheet Functions 3 December 27th 06 01:54 PM


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