Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Color color! Cell color!
hi i've got two range : ("C5:N35" that contain data) and ("P5:AA35" that will have different color depending on user inupt)! There is 6 different colors(so NO i CANT USE conditionnal formating), i want something in vb, macro for excel 2002! So here an example : If in cell P10, the user put the letter N, the cell become red. It will also change the cell color in C10. Can you guys help me? Thanks in advance! Maxime -- mhax ------------------------------------------------------------------------ mhax's Profile: http://www.excelforum.com/member.php...o&userid=36450 View this thread: http://www.excelforum.com/showthread...hreadid=567581 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Color color! Cell color!
I can't take credit for this, because I didn't write it. But this page
should be able to help you out. http://www.personal-computer-tutor.c...v18/chad18.htm mhax wrote: hi i've got two range : ("C5:N35" that contain data) and ("P5:AA35" that will have different color depending on user inupt)! There is 6 different colors(so NO i CANT USE conditionnal formating), i want something in vb, macro for excel 2002! So here an example : If in cell P10, the user put the letter N, the cell become red. It will also change the cell color in C10. Can you guys help me? Thanks in advance! Maxime -- mhax ------------------------------------------------------------------------ mhax's Profile: http://www.excelforum.com/member.php...o&userid=36450 View this thread: http://www.excelforum.com/showthread...hreadid=567581 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Color color! Cell color!
maybe something david mcritchie has will help
http://www.mvps.org/dmcritchie/excel/event.htm#case -- Gary "mhax" wrote in message ... hi i've got two range : ("C5:N35" that contain data) and ("P5:AA35" that will have different color depending on user inupt)! There is 6 different colors(so NO i CANT USE conditionnal formating), i want something in vb, macro for excel 2002! So here an example : If in cell P10, the user put the letter N, the cell become red. It will also change the cell color in C10. Can you guys help me? Thanks in advance! Maxime -- mhax ------------------------------------------------------------------------ mhax's Profile: http://www.excelforum.com/member.php...o&userid=36450 View this thread: http://www.excelforum.com/showthread...hreadid=567581 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Color color! Cell color!
Something like
Private Sub Worksheet_Change(ByVal Target As Range) Const WS_RANGE As String = "H1:H10" On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then With Target Select Case .Value Case "N": .Interior.ColorIndex = 3 'red Case "X": .Interior.ColorIndex = 6 'yellow Case "Y": .Interior.ColorIndex = 5 'blue Case "G": .Interior.ColorIndex = 10 'green End Select End With End If ws_exit: Application.EnableEvents = True End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "mhax" wrote in message ... hi i've got two range : ("C5:N35" that contain data) and ("P5:AA35" that will have different color depending on user inupt)! There is 6 different colors(so NO i CANT USE conditionnal formating), i want something in vb, macro for excel 2002! So here an example : If in cell P10, the user put the letter N, the cell become red. It will also change the cell color in C10. Can you guys help me? Thanks in advance! Maxime -- mhax ------------------------------------------------------------------------ mhax's Profile: http://www.excelforum.com/member.php...o&userid=36450 View this thread: http://www.excelforum.com/showthread...hreadid=567581 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Color color! Cell color!
Take a look at this download from xlDynamic. It extends Conditional
formatting from 3 to 30... http://www.xldynamic.com/source/xld.....Download.html -- HTH... Jim Thomlinson "mhax" wrote: hi i've got two range : ("C5:N35" that contain data) and ("P5:AA35" that will have different color depending on user inupt)! There is 6 different colors(so NO i CANT USE conditionnal formating), i want something in vb, macro for excel 2002! So here an example : If in cell P10, the user put the letter N, the cell become red. It will also change the cell color in C10. Can you guys help me? Thanks in advance! Maxime -- mhax ------------------------------------------------------------------------ mhax's Profile: http://www.excelforum.com/member.php...o&userid=36450 View this thread: http://www.excelforum.com/showthread...hreadid=567581 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Color color! Cell color!
wow ty guys for all the infos! i will try to figure that out! Jim Thomlinson Wrote: Take a look at this download from xlDynamic. It extends Conditional formatting from 3 to 30... http://www.xldynamic.com/source/xld.....Download.html -- HTH... Jim Thomlinson "mhax" wrote: hi i've got two range : ("C5:N35" that contain data) and ("P5:AA35 that will have different color depending on user inupt)! There is 6 different colors(so NO i CANT USE conditionnal formating) i want something in vb, macro for excel 2002! So here an example : If in cell P10, the user put the letter N, the cell become red. It will also change the cell color in C10. Can you guys help me? Thanks in advance! Maxime -- mhax ------------------------------------------------------------------------ mhax's Profile http://www.excelforum.com/member.php...o&userid=36450 View this thread http://www.excelforum.com/showthread...hreadid=567581 -- mha ----------------------------------------------------------------------- mhax's Profile: http://www.excelforum.com/member.php...fo&userid=3645 View this thread: http://www.excelforum.com/showthread.php?threadid=56758 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can't format cell color/text color in Office Excel 2003 in fil | Excel Discussion (Misc queries) | |||
Make text color match cell color with macro? | Excel Discussion (Misc queries) | |||
change fill color of a range of cells based on color of a cell? | Excel Programming | |||
Can't format cell color/text color in Office Excel 2003 in files . | Excel Discussion (Misc queries) | |||
Browse Forms Controls and change TextBox color based on cell color | Excel Programming |