[mso] FW: Excel Conditional Formatting

  • From: "Jim Hickey" <jim@xxxxxxxxxxx>
  • To: <mso@xxxxxxxxxxxxx>
  • Date: Wed, 19 Sep 2007 10:33:18 -0500

John,

Don't know why it appeared with all that a0=3D stuff but I will try a
different approach.
 I will post it on the yahoo site and call it cell color.

Jim



-----Original Message-----
From: Jim Hickey [mailto:jim@xxxxxxxxxxx]=20
Sent: Wednesday, September 19, 2007 10:15 AM
To: 'mso@xxxxxxxxxxxxx'
Subject: RE: [mso] Excel Conditional Formatting


John,

I don't remember where I got this, but here is some VBA that you should =
be
able to modify to what you need. This code changes the color of a cell =
based
on the contents of the cell. I know this is based on the contents of the
actual cell, but you should be able to modify to change a cell based on =
the
value of another cell.  HTH, Good luck

Jim

You need to put this in the Worksheet area of the VBA editor
=A0=A0=A0 If (Target.Row =3D 1) Then
=A0=A0=A0=A0=A0=A0=A0 Select Case Target
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Case "A"
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Target.Interior.ColorIndex =
=3D 3
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Target.Font.ColorIndex =3D =
2
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Case "P"
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Target.Interior.ColorIndex =
=3D 4
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Target.Font.ColorIndex =3D =
2
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Case "WO"
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Target.Interior.ColorIndex =
=3D 5
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Target.Font.ColorIndex =3D =
2
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Case "ML"
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Target.Interior.ColorIndex =
=3D 6
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Target.Font.ColorIndex =3D =
2
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Case "LWOP"
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Target.Interior.ColorIndex =
=3D 7
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Target.Font.ColorIndex =3D =
2
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Case "HP"
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Target.Interior.ColorIndex =
=3D 8
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Target.Font.ColorIndex =3D =
2
=A0=A0=A0=A0=A0=A0=A0 End Select
=A0=A0=A0 End If
End Sub

-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx] On =
Behalf
Of John Clarke
Sent: Wednesday, September 19, 2007 9:51 AM
To: mso@xxxxxxxxxxxxx
Subject: [mso] Excel Conditional Formatting


Hi All
Is it possible to have more than 3 conditional formatting functions?  I
would like to have 5.

If it isn't, what I want to do is hi-light a cell with a particular =
colour
depending on its content.

Lets say:


In cell A6 I want to enter the letter "C" and have it colour red In cell =
A7
I want to enter the letters "AA" and have it blue
In cell A8 I want to enter the letter "I" and leave it with no-fill      =
etc
etc with about 5 or 6 different sets.

I hope someone can help me.  (In fact, I *Know* someone will)

Kindest regards

John


*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx =
or
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, visit the group's homepage and use the
dropdown menu at the top.  This will allow you to unsubscribe your email
address or change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to share files with the group, you must join our Yahoo sister
group.  This group will not allow for posting of emails, but will allow =
you
to join and share problem files, templates, etc.:
http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for =
FILE
SHARING ONLY.

If you are using Outlook and you see a lot of unnecessary code in your =
email
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************
No virus found in this incoming message.
Checked by AVG Free Edition.=20
Version: 7.5.487 / Virus Database: 269.13.22/1015 - Release Date: =
9/18/2007
11:53 AM

No virus found in this outgoing message.
Checked by AVG Free Edition.=20
Version: 7.5.487 / Virus Database: 269.13.22/1015 - Release Date: =
9/18/2007
11:53 AM
=20

No virus found in this outgoing message.
Checked by AVG Free Edition.=20
Version: 7.5.487 / Virus Database: 269.13.22/1015 - Release Date: =
9/18/2007
11:53 AM
=20

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, visit the group's homepage and use the dropdown 
menu at the top.  This will allow you to unsubscribe your email address or 
change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to share files with the group, you must join our Yahoo sister group. 
 This group will not allow for posting of emails, but will allow you to join 
and share problem files, templates, etc.:  
http://tech.groups.yahoo.com/group/MicrosoftOffice . This group is for FILE 
SHARING ONLY.

If you are using Outlook and you see a lot of unnecessary code in your email 
messages, read these instructions that explain why and how to fix it:
http://personal-computer-tutor.com/abc3/v28/greg28.htm
*************************************************************

Other related posts:

  • » [mso] FW: Excel Conditional Formatting