Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 380
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
Can't format cell color/text color in Office Excel 2003 in fil Tony S Excel Discussion (Misc queries) 1 December 21st 07 01:41 PM
Make text color match cell color with macro? JoeSpareBedroom Excel Discussion (Misc queries) 1 June 26th 07 07:09 PM
change fill color of a range of cells based on color of a cell? DarMelNel Excel Programming 0 March 2nd 06 06:35 PM
Can't format cell color/text color in Office Excel 2003 in files . albertaman Excel Discussion (Misc queries) 0 February 16th 06 03:56 AM
Browse Forms Controls and change TextBox color based on cell color StefanW Excel Programming 2 November 21st 04 07:06 PM


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