Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 148
Default color coding cells

Does anyone know if it is possible to colorcode cells? An example is if this
is under budget I want the cell to appear green. If it is possible, how is
it done?

Thanks
Heather
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default color coding cells

Hi Heather

you have a couple of options -

you can use conditional formatting (format / conditional formatting) if you
have 3 or less conditions .... if you have more then:-

1) Bob Phillips has an add-in available for download from his site
http://www.xldynamic.com/source/xld.....Download.html

2) John McGimpsey has notes on his site on how to do up to 6 without VBA

http://www.mcgimpsey.com/excel/conditional6.html

3) Use VBA - here's an example:

the following code pasted into the "sheet module" of the sheet - right mouse

click on the sheet tab that you want the conditional formatting on and

choose view / code you should see on the top left of the VBE window your

file name in bold (if not try view / project explorer) and the sheet that

you were on selected ...that's the "sheet module" ...on the right you should

see some white space - copy & paste the code in there -

assuming you want the conditional formatting to work on cell B6

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:

Application.EnableEvents = False

If Not Intersect(Target, Range("B6")) Is Nothing Then

With Target

Select Case .Value

Case 1: Range("B6").Font.ColorIndex = 4

Case 2: Range("B6").Font.ColorIndex = 3

Case 3: Range("B6").Font.ColorIndex = 0

Case 4: Range("B6").Font.ColorIndex = 6

Case 5: Range("B6").Font.ColorIndex = 13

Case 6: Range("B6").Font.ColorIndex = 46

Case 7: Range("B6").Font.ColorIndex = 11

Case 8: Range("B6").Font.ColorIndex = 7

Case 9: Range("B6").Font.ColorIndex = 55

End Select

End With

End If

ws_exit:

Application.EnableEvents = True

End Sub

--- this turns the font of B6 a different colour depending on what value

(between 1 & 9) is entered in the cell.

if you'ld like additonal help with your criteria & formatting statements,

please feel free to post back with more details.

Cheers

JulieD

"heather" wrote in message
...

Does anyone know if it is possible to colorcode cells? An example is if
this
is under budget I want the cell to appear green. If it is possible, how
is
it done?

Thanks
Heather



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default color coding cells

Try Conditional formatting. On the menu bar got to Format Conditional
Formatting and enter your conditions. If you need info on useing conditional
formatting, go to http://www.functionx.com/excel/Lesson07.htm

Hope this helps

"heather" wrote:

Does anyone know if it is possible to colorcode cells? An example is if this
is under budget I want the cell to appear green. If it is possible, how is
it done?

Thanks
Heather

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default color coding cells

Heather,

Use conditional formatting. Look at 'Highlight cells that meet specific
conditions' in the Answer wizard in Help.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"heather" wrote in message
...
Does anyone know if it is possible to colorcode cells? An example is if

this
is under budget I want the cell to appear green. If it is possible, how

is
it done?

Thanks
Heather



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
Color coding cells JayDee Excel Worksheet Functions 2 July 24th 08 10:46 PM
Color coding cells Angela Excel Discussion (Misc queries) 2 September 27th 06 09:20 PM
Color Coding Cells c_shema Excel Worksheet Functions 1 February 5th 06 02:50 PM
Color coding cells in Excel jdiedrick Excel Discussion (Misc queries) 3 September 12th 05 11:39 PM
Color Coding Cells Trevor Shuttleworth Excel Programming 2 July 22nd 03 07:03 PM


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