ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Color color! Cell color! (https://www.excelbanter.com/excel-programming/369170-color-color-cell-color.html)

mhax[_17_]

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


[email protected]

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



Gary Keramidas

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




Bob Phillips

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




Jim Thomlinson

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



mhax[_18_]

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



All times are GMT +1. The time now is 04:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com