Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel: Conditional Formating question 2

Status
Not open for further replies.

WebStar

Programmer
May 1, 2002
69
0
0
DE
Hi,
I am having a problem with conditional formating in Excel. I need to make 6 conditions. If cell value is "finished" or "green" the cell should be green, if the value is "working" ot "yellow" should be yelow, and if it is "wrong finished" or "red" should be red. How can I combine all these conditions into only those three fields there?
Thank you!
 
Hi WebStar
You can't have more than 3 conditions manually set (up to xl2k at least.)

I'm sure there is a FAQ on this but you will need code, along the lines of what I've posted below.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Text
    Case "finished", "green"
        Target.Interior.Color = vbGreen
    Case "working", "yellow"
        Target.Interior.Color = vbYellow
    Case "wrong finished", "red"
        Target.Interior.Color = vbRed
End Select
End Sub

Hope this helps
;-)

If a man says something and there are no women there to hear him, is he still wrong? [ponder]
The faqs ma'am, just the faqs. Get the best from these forums : faq222-2244
 
Not sure about an FAQ but try:

thread68-223068

Neil Berryman
IT Trainer
neil_berryman@btopenworld.com
 
Well, realistically, tehre ARE only 3 conditions

condition1: If "Finished" OR "Green" then green

Use this construct and apply to the other conditions

Change left dropdown to "Formula Is"
and enter:
=OR(A1="Finished",A1="Green")

where A1 is your starting cell ref

Rgds, Geoff
[blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
 
All answers were good for global problems but I guess xlbo was perfect for my case. Anyway the formula should be:
=OR(A1="Finished";A1="Green") (it was a semicolon instead of a comma)
Thank you all!
 
Webstar - that just depends on your setup - it's commas for me ;-)

Rgds, Geoff
[blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
 
no need to apologise - just different setups

Rgds, Geoff
[blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
 
I'm sure there was a FAQ!!! Maybe there should be.

Anyway the non VBA option is something (else) I hadn't thought of so a purple pointy pip from me too!

;-)

If a man says something and there are no women there to hear him, is he still wrong? [ponder]
The faqs ma'am, just the faqs. Get the best from these forums : faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top