No I also have the following text
Pending
Broken
Running
Not Completed
Each Week I have to update this spreadsheet
A B C D E
1 ENV 02/01/08 02/08/08 02/15/08
2 Web Pass Pass Broken
3 MFrame Pass Fail Fixed
4 GUI WIP Pending Running
5
after our health check we go into this spreadsheet and update it. I was
using conditional formatting but I only could add three conditional. also
since they shared the workbook to everyone, conditional formatting is no
longer working....
That is why i was trying to create a macro that we could run that would
change the cell background and font based on the text in the cell
Thanks for the help
Argus
On Feb 8, 3:02 pm, "Argus Rogue" <argusro...@satx.rr.com> wrote:
> hello all,
>
[quoted text clipped - 32 lines]
>
> Any and all help in the matte is greatly appreciated
How is [text] referenced? Do you get it from a Cell, or is it in your
VBA-Process?
If you only need to distinguish between 3 statements (Fail, Pass and
WIP) then i would recommend "Conditional Formatting"
You can select Range A1:J19, then goto Format --> Conditional
Formatting, there you choose "Formula is" and then you enter
=$A$20="Fail"
then you select the Pattern and everything, then you press Add... and
do the same again for Pass and WIP.
You only have 3 possibilities...if you need more then we have to go
back to your VBA code.
(Look up "Select Case" and don't use selection, but we can check that
later)
Hth
Carlo
Don Guillett - 08 Feb 2008 17:34 GMT
try
Sub colorcells()
mc = "e"
lr = Cells(Rows.Count, mc).End(xlUp).Row
For Each c In Range(Cells(2, mc), Cells(lr, mc))
Select Case UCase(c)
Case "PENDING": myc = 5
Case "BROKEN": myc = 36
Case "RUNNING": myc = 8
'Not Completed
'as many as you need
Case Else
End Select
c.Interior.ColorIndex = myc
Next
End Sub

Signature
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett1@austin.rr.com
> No I also have the following text
> Pending
[quoted text clipped - 77 lines]
> Hth
> Carlo
Argus - 12 Feb 2008 03:44 GMT
> try
> Sub colorcells()
[quoted text clipped - 101 lines]
>
> - Show quoted text -
it only colors or updates column "e". How can I get it to do the
whold sheet
carlo - 12 Feb 2008 05:04 GMT
> > try
> > Sub colorcells()
[quoted text clipped - 109 lines]
>
> - Show quoted text -
You could add following part to the sub:
Sub colorcells()
mc = "e"
lr = Cells(Rows.Count, mc).End(xlUp).Row
For Each c In Range(Cells(2, mc), Cells(lr, mc))
Select Case UCase(c)
Case "PENDING": myc = 5
Case "BROKEN": myc = 36
Case "RUNNING": myc = 8
'Not Completed
'as many as you need
Case Else
End Select
c.entirerow.Interior.ColorIndex = myc
Next
End Sub
hth
Carlo
Don Guillett - 12 Feb 2008 14:33 GMT
Sub colorALLcells()
'lr = Cells(Rows.Count, "a").End(xlUp).Row
'For Each c In Range(Cells(2, "b"), Cells(lr, "d"))
For Each c In ActiveSheet.UsedRange
Select Case UCase(c)
Case "PENDING": myc = 5
Case "BROKEN": myc = 36
Case "RUNNING": myc = 8
'Not Completed
'as many as you need
Case Else
myc = 0
End Select
c.Interior.ColorIndex = myc
Next
End Sub

Signature
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett1@austin.rr.com
On Feb 8, 11:34 am, "Don Guillett" <dguille...@austin.rr.com> wrote:
> try
> Sub colorcells()
[quoted text clipped - 106 lines]
>
> - Show quoted text -
it only colors or updates column "e". How can I get it to do the
whold sheet