#1   Report Post  
Posted to microsoft.public.excel.misc
Simon Jefford
 
Posts: n/a
Default cell formatting

I would like to format a cell based upon the contents of another cell. The
problem is that the determining cell has five variations - hence I cannot use
conditional formatting as this only allows three variations. In total, on a
worksheet, I have about 160 cells whose format I wish to change based upon
the contents of 160 associated cells on another worksheet. When changing the
format, I wish to change forground and background colours.
Any help would be much appreciated.
Thanks, Simon
  #2   Report Post  
Posted to microsoft.public.excel.misc
SteveG
 
Posts: n/a
Default cell formatting


Simon,

If you could describe your 5 variations and what you would like the
cell formatted as for each it would be helpful. Will each variation
produce a unique formatting? If multiple variations will result in the
same format, CF may work for you using formulas.



Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=504882

  #3   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default cell formatting

Without details on desired colors vs values here is a simple sample demo of
how to change the interior color of B1 based upon the value in A1:

Sub Macro1()
Range("B1").Interior.ColorIndex = Range("A1").Value
End Sub

1. enter the macro
2. put a number in A1 (like 36)
3. run the macro


The sample can easily be modified to handle alternative mappings and font
colors as well.
--
Gary's Student


"Simon Jefford" wrote:

I would like to format a cell based upon the contents of another cell. The
problem is that the determining cell has five variations - hence I cannot use
conditional formatting as this only allows three variations. In total, on a
worksheet, I have about 160 cells whose format I wish to change based upon
the contents of 160 associated cells on another worksheet. When changing the
format, I wish to change forground and background colours.
Any help would be much appreciated.
Thanks, Simon

  #4   Report Post  
Posted to microsoft.public.excel.misc
Simon Jefford
 
Posts: n/a
Default cell formatting

Steve

Thanks for the reply.
I have a column of entries in column C. All entries are integers from 1 to
5. I wish to format Column A based upon the entries in Column C.

If the entry in cell C is "1" then format cell in column A background RED
forground WHITE.

If the entry in cell C is "2" then format cell in column A background GREEN
forground BLACK.

If the entry in cell C is "3" then format cell in column A background YELLOW
forground BLACK.

If the entry in cell C is "4" then format cell in column A background BLUE
forground WHITE.

If the entry in cell C is "5" then format cell in column A background LIGHT
GREY forground BLACK.

Many thanks
Simon


Simon,

If you could describe your 5 variations and what you would like the
cell formatted as for each it would be helpful. Will each variation
produce a unique formatting? If multiple variations will result in the
same format, CF may work for you using formulas.



Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=504882


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
Conditional Formatting For A Cell Other Than The One With The Form Jim J. Excel Worksheet Functions 2 February 19th 06 07:11 PM
Drop Down List that has formatting of cell range Font ect. Tom Meacham Excel Discussion (Misc queries) 1 January 11th 06 01:43 AM
can conditional formatting on one cell value to another cell valu Ring eye Excel Worksheet Functions 2 January 10th 06 07:32 PM
Transfer Cell Formatting for linked cells Scott Excel Discussion (Misc queries) 2 November 23rd 05 11:04 PM
cell color index comparison MINAL ZUNKE New Users to Excel 1 June 30th 05 07:11 AM


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