Adding more than three Conditions to 'Conditional Formatting'

Can i add more than three conditions to the conditional formatting
presets using code?

Regards

[Riz]


-- 
Rizitsu
------------------------------------------------------------------------
Rizitsu's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=15840
View this thread: http://www.excelforum.com/showthread.php?threadid=320382

0
11/25/2004 12:56:12 PM
excel.misc 78881 articles. 5 followers. Follow

9 Replies
1313 Views

Similar Articles

[PageSpeed] 0

Riz, as you have found out, only 3 conditions with conditional formatting.
But yes you can use some code to get more than 3, try this it will change
the cell color in column A when you put in one ,two, three, or four, right
click on the sheet tab and view code, paste it in the window that opens.

Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Cells.Count > 1 Then Exit Sub
    If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub
        With Target
        Select Case LCase(.Value)
            Case Is = "one":  .Interior.ColorIndex = 5
            Case Is = "two": .Interior.ColorIndex = 6
            Case Is = "three": .Interior.ColorIndex = 7
            Case Is = "four": .Interior.ColorIndex = 8
            Case Else
                .Interior.ColorIndex = xlNone
        End Select
    End With
    End Sub


-- 
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Rizitsu" <Rizitsu.1ga2hz@excelforum-nospam.com> wrote in message
news:Rizitsu.1ga2hz@excelforum-nospam.com...
>
> Can i add more than three conditions to the conditional formatting
> presets using code?
>
> Regards
>
> [Riz]
>
>
> -- 
> Rizitsu
> ------------------------------------------------------------------------
> Rizitsu's Profile:
http://www.excelforum.com/member.php?action=getinfo&userid=15840
> View this thread: http://www.excelforum.com/showthread.php?threadid=320382
>


0
11/25/2004 1:19:26 PM
Riz,

There is an addin for this at
http://www.xldynamic.com/source/xld.CFPlus.Download.html

-- 

HTH

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


"Rizitsu" <Rizitsu.1ga2hz@excelforum-nospam.com> wrote in message
news:Rizitsu.1ga2hz@excelforum-nospam.com...
>
> Can i add more than three conditions to the conditional formatting
> presets using code?
>
> Regards
>
> [Riz]
>
>
> -- 
> Rizitsu
> ------------------------------------------------------------------------
> Rizitsu's Profile:
http://www.excelforum.com/member.php?action=getinfo&userid=15840
> View this thread: http://www.excelforum.com/showthread.php?threadid=320382
>


0
bob.phillips1 (6510)
11/25/2004 1:50:40 PM
This isn't help but...

Can you hide rows/cells using conditional formatting?

If so, how?

Thanks

mar

--
mark_b241
-----------------------------------------------------------------------
mark_b2410's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1684
View this thread: http://www.excelforum.com/showthread.php?threadid=32038

0
11/25/2004 2:08:01 PM
mark

You cannot hide rows using CF.

You could color the font to white so's it doesn't show up on-screen.

Then you have to make the cells "hidden" so's they wouldn't show in the
Formula Bar.

Then you have to protect the worksheet so's users could not change things.

You would be better off using VBA code to hide the rows based on some
condition.

Gord Dibben Excel MVP

On Thu, 25 Nov 2004 08:08:01 -0600, mark_b2410
<mark_b2410.1ga5qn@excelforum-nospam.com> wrote:

>
>This isn't help but...
>
>Can you hide rows/cells using conditional formatting?
>
>If so, how?
>
>Thanks
>
>mark

0
Gord
11/25/2004 4:46:44 PM
Thank you, Si

--
mark_b241
-----------------------------------------------------------------------
mark_b2410's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1684
View this thread: http://www.excelforum.com/showthread.php?threadid=32038

0
11/25/2004 5:18:30 PM
Errr, how do you make the formula "hidden"?

Cheers

Mar

--
mark_b241
-----------------------------------------------------------------------
mark_b2410's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1684
View this thread: http://www.excelforum.com/showthread.php?threadid=32038

0
11/25/2004 5:29:16 PM
Select the cell(s)

Format>Cells>Protection.  Check "Hidden" and OK your way out.

When worksheet protection is enabled, you will see nothing in the Formula Bar.

Gord



On Thu, 25 Nov 2004 11:29:16 -0600, mark_b2410
<mark_b2410.1gaezz@excelforum-nospam.com> wrote:

>
>Errr, how do you make the formula "hidden"?
>
>Cheers
>
>Mark

0
Gord
11/25/2004 6:32:01 PM
Hi Mark,
Not with Conditional Formatting, but you can use Auto Filter
and the formulas just like Conditional Formatting are
Worksheet Functions that return either True or False.

See Debra Dalgleish's site  contextures.com
  Excel Filters -- Advanced Filter -- Complex Criteria
  http://www.contextures.com/xladvfilter02.html
---
HTH,
David McRitchie, Microsoft MVP - Excel    [site changed  Nov. 2001]
My Excel Pages:  http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page:        http://www.mvps.org/dmcritchie/excel/search.htm

"mark_b2410" <mark_b2410.1ga5qn@excelforum-nospam.com> wrote in message news:mark_b2410.1ga5qn@excelforum-nospam.com...
>
> This isn't help but...
>
> Can you hide rows/cells using conditional formatting?
>
> If so, how?
>
> Thanks
>
> mark
>
>
> -- 
> mark_b2410
> ------------------------------------------------------------------------
> mark_b2410's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=16848
> View this thread: http://www.excelforum.com/showthread.php?threadid=320382
>


0
dmcritchie (2586)
11/27/2004 5:51:09 PM
Hi Mark,
Probably should have pointed you to this to start with
  Excel Filters -- Advanced Filter
  http://www.contextures.com/xladvfilter01.html

Filters are fun to work with,  when you copy and paste from
a filtered list all you pick up is what is not filtered out, and
Mail Merge (MS Word) only see the filtered list.
  http://www.mvps.org/dmcritchie/excel/mailmerg.htm
---
HTH,
David McRitchie, Microsoft MVP - Excel    [site changed  Nov. 2001]
My Excel Pages:  http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page:        http://www.mvps.org/dmcritchie/excel/search.htm

> "mark_b2410" <mark_b2410.1ga5qn@excelforum-nospam.com> wrote in message
> > This isn't help but...
> > Can you hide rows/cells using conditional formatting?


0
dmcritchie (2586)
11/27/2004 6:03:03 PM
Reply:

Similar Artilces: