Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default how do I carry cell colors?

I'm trying to set up an automatic work schedule.
I have 10 names (cells are color shaded by a unique color)
How do I carry that individual's cell color in to a new cell with some sort
of formula? or what is the formula for cell color shades?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default how do I carry cell colors?

You can't use formulas to change cell/font color. Formulas only return
values to their calling cells.

If you're using XL2007, you can set up conditional formatting for each
of the 10 names.

If you're not, you'll need to use an event macro to do it automatically.
For instance, if your copied cells are in J1:Z100:

Private Sub Worksheet_Calculate()
Dim rFormulas As Range
Dim rCell As Range

On Error Resume Next
Set rFormulas = Range("J1:Z100").SpecialCells(xlCellTypeFormulas)
On Error GoTo 0
If Not rFormulas Is Nothing Then
For Each rCell In rFormulas
Select Case rCell.Text
Case "Smith"
rCell.Interior.ColorIndex = 3
Case "Jones"
rCell.Interior.ColorIndex = 5
Case "Johnson"
rCell.Interior.ColorIndex = 7
'Additional cases here...
Case Else
rCell.Interior.ColorIndex = xlColorIndexNone
End Select
Next rCell
End If
End Sub


In article ,
Pelusa wrote:

I'm trying to set up an automatic work schedule.
I have 10 names (cells are color shaded by a unique color)
How do I carry that individual's cell color in to a new cell with some sort
of formula? or what is the formula for cell color shades?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default how do I carry cell colors?

That's it! Thank you for the code!



"Pelusa" wrote:

I'm trying to set up an automatic work schedule.
I have 10 names (cells are color shaded by a unique color)
How do I carry that individual's cell color in to a new cell with some sort
of formula? or what is the formula for cell color shades?

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 should carry cell protection to other office productivity pr Zzyzxensis Excel Discussion (Misc queries) 1 July 17th 06 03:33 PM
Can Excel 2003 cell link carry with it the source cell format? tom Excel Discussion (Misc queries) 2 July 14th 06 06:14 AM
How can I carry cell formatting in paste link bre Excel Discussion (Misc queries) 6 April 24th 06 05:02 AM
Can't format font colors or cell fill-in colors canoeron Excel Discussion (Misc queries) 3 August 22nd 05 11:46 PM
How to carry over conditional format colors to a chart Tim A Charts and Charting in Excel 1 April 1st 05 12:59 AM


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