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 change tab colour when using conditional formatting in a cell

how can I change a tab to colour to highlight a problem without going into an
actual worksheet to work on
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default change tab colour when using conditional formatting in a cell

You cannot use CF to change a Tab color.

You would need VBA.

Either event code or just a macro.

Sub test()
If Sheets("Sheet2").Range("A1").Value < "hello" Then
Sheets("Sheet1").Tab.ColorIndex = 6
Else
Sheets("Sheet1").Tab.ColorIndex = -4142
End If
End Sub


Gord Dibben MS Excel MVP

On Mon, 23 Oct 2006 11:27:02 -0700, julie s <julie
wrote:

how can I change a tab to colour to highlight a problem without going into an
actual worksheet to work on


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default change tab colour when using conditional formatting in a cell



"Gord Dibben" wrote:

You cannot use CF to change a Tab color.

You would need VBA.

Either event code or just a macro.

Sub test()
If Sheets("Sheet2").Range("A1").Value < "hello" Then
Sheets("Sheet1").Tab.ColorIndex = 6
Else
Sheets("Sheet1").Tab.ColorIndex = -4142
End If
End Sub


Gord Dibben MS Excel MVP

On Mon, 23 Oct 2006 11:27:02 -0700, julie s <julie
wrote:

how can I change a tab to colour to highlight a problem without going into an
actual worksheet to work on


can you take me through this as I don't know how to

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default change tab colour when using conditional formatting in a cell

that is great but how do i do that???

"Gord Dibben" wrote:

You cannot use CF to change a Tab color.

You would need VBA.

Either event code or just a macro.

Sub test()
If Sheets("Sheet2").Range("A1").Value < "hello" Then
Sheets("Sheet1").Tab.ColorIndex = 6
Else
Sheets("Sheet1").Tab.ColorIndex = -4142
End If
End Sub


Gord Dibben MS Excel MVP

On Mon, 23 Oct 2006 11:27:02 -0700, julie s <julie
wrote:

how can I change a tab to colour to highlight a problem without going into an
actual worksheet to work on



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default change tab colour when using conditional formatting in a cell

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + R to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP


On Mon, 23 Oct 2006 12:04:02 -0700, julie s
wrote:



"Gord Dibben" wrote:

You cannot use CF to change a Tab color.

You would need VBA.

Either event code or just a macro.

Sub test()
If Sheets("Sheet2").Range("A1").Value < "hello" Then
Sheets("Sheet1").Tab.ColorIndex = 6
Else
Sheets("Sheet1").Tab.ColorIndex = -4142
End If
End Sub


Gord Dibben MS Excel MVP

On Mon, 23 Oct 2006 11:27:02 -0700, julie s <julie
wrote:

how can I change a tab to colour to highlight a problem without going into an
actual worksheet to work on


can you take me through this as I don't know how to


Gord Dibben MS Excel MVP


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,574
Default change tab colour when using conditional formatting in a cell

Hit ALT+ F11 and cop and paste Gord's code into the white space on the right
hand side of the window that appears. Hit save and close out of that window.
Now, if A1 contains something other than "Hello" you will see the tab color
for that sheet1 change.

Change the cell and sheet reference as appropriate for your sitatuation.

Dave
--
Brevity is the soul of wit.


"julie s" wrote:

that is great but how do i do that???

"Gord Dibben" wrote:

You cannot use CF to change a Tab color.

You would need VBA.

Either event code or just a macro.

Sub test()
If Sheets("Sheet2").Range("A1").Value < "hello" Then
Sheets("Sheet1").Tab.ColorIndex = 6
Else
Sheets("Sheet1").Tab.ColorIndex = -4142
End If
End Sub


Gord Dibben MS Excel MVP

On Mon, 23 Oct 2006 11:27:02 -0700, julie s <julie
wrote:

how can I change a tab to colour to highlight a problem without going into an
actual worksheet to work on



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default change tab colour when using conditional formatting in a cell

thank you I will try and let you know how I get on

"Dave F" wrote:

Hit ALT+ F11 and cop and paste Gord's code into the white space on the right
hand side of the window that appears. Hit save and close out of that window.
Now, if A1 contains something other than "Hello" you will see the tab color
for that sheet1 change.

Change the cell and sheet reference as appropriate for your sitatuation.

Dave
--
Brevity is the soul of wit.


"julie s" wrote:

that is great but how do i do that???

"Gord Dibben" wrote:

You cannot use CF to change a Tab color.

You would need VBA.

Either event code or just a macro.

Sub test()
If Sheets("Sheet2").Range("A1").Value < "hello" Then
Sheets("Sheet1").Tab.ColorIndex = 6
Else
Sheets("Sheet1").Tab.ColorIndex = -4142
End If
End Sub


Gord Dibben MS Excel MVP

On Mon, 23 Oct 2006 11:27:02 -0700, julie s <julie
wrote:

how can I change a tab to colour to highlight a problem without going into an
actual worksheet to work on


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
Change Colour on a Cell after another cell has been changed David Hardy Excel Discussion (Misc queries) 1 August 30th 06 04:15 PM
Conditional formatting similar to shading alternating rows Conan Kelly Excel Worksheet Functions 10 August 22nd 06 11:13 PM
Conditional formatting if value in cell is found in a named range Grumpy Grandpa Excel Worksheet Functions 5 April 15th 06 04:30 PM
Conditional Formatting to Test Value in Cell Carroll Excel Worksheet Functions 3 March 9th 06 07:38 PM
Conditional Formatting Cell < Today() sagan Excel Worksheet Functions 3 September 21st 05 03:43 PM


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