ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Changing Cell Fill Colour (https://www.excelbanter.com/excel-discussion-misc-queries/1296-changing-cell-fill-colour.html)

Nick

Changing Cell Fill Colour
 
I have a sheet where I enter different codes into the
cell. What I would like to do is when I enter a code the
cell background changes colour. There could be up to 10
codes so if I entered "AL" into a cell the background
could be RED or if I change the code to an "S" the cell
could be BLUE.
Is this possible?

All help appreciated

Nick


Bob Phillips

Take a look at the CFPlus addin at
http://www.xldynamic.com/source/xld.....Download.html

--

HTH

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


"Nick" wrote in message
...
I have a sheet where I enter different codes into the
cell. What I would like to do is when I enter a code the
cell background changes colour. There could be up to 10
codes so if I entered "AL" into a cell the background
could be RED or if I change the code to an "S" the cell
could be BLUE.
Is this possible?

All help appreciated

Nick




Nick

Thanks Bob
Does everyone who uses this worksheet need to have the
addin or does it stay with the sheet.
Hope this makes sense.

Nick

-----Original Message-----
Take a look at the CFPlus addin at
http://www.xldynamic.com/source/xld.....Download.html

--

HTH

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


"Nick" wrote in

message
...
I have a sheet where I enter different codes into the
cell. What I would like to do is when I enter a code the
cell background changes colour. There could be up to 10
codes so if I entered "AL" into a cell the background
could be RED or if I change the code to an "S" the cell
could be BLUE.
Is this possible?

All help appreciated

Nick



.


Don Guillett

Use a worksheet_event with select case to change your format,something like
this.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
With Target
Select Case Target.Value
Case Is = 76
.Interior.ColorIndex = 3 '(red shade)
Case Is = 52
.Interior.ColorIndex = 4 '(green shade)
Case Is = 26
.Interior.ColorIndex = 46 '(orange shade)
Case Is = 11
.Interior.ColorIndex = 41 '(blue shade)
Case Is = 6
.Interior.ColorIndex = 6 '(yellow shade)
End Select
End With
End If
End Sub


--
Don Guillett
SalesAid Software

"Nick" wrote in message
...
I have a sheet where I enter different codes into the
cell. What I would like to do is when I enter a code the
cell background changes colour. There could be up to 10
codes so if I entered "AL" into a cell the background
could be RED or if I change the code to an "S" the cell
could be BLUE.
Is this possible?

All help appreciated

Nick




Bob Phillips

Yes, that is a 'feature' of the addin, as it uses event code embedded in the
addin.

--

HTH

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


"Nick" wrote in message
...
Thanks Bob
Does everyone who uses this worksheet need to have the
addin or does it stay with the sheet.
Hope this makes sense.

Nick

-----Original Message-----
Take a look at the CFPlus addin at
http://www.xldynamic.com/source/xld.....Download.html

--

HTH

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


"Nick" wrote in

message
...
I have a sheet where I enter different codes into the
cell. What I would like to do is when I enter a code the
cell background changes colour. There could be up to 10
codes so if I entered "AL" into a cell the background
could be RED or if I change the code to an "S" the cell
could be BLUE.
Is this possible?

All help appreciated

Nick



.





All times are GMT +1. The time now is 09:17 AM.

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