ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Conditional Formatting with more than 3 options (https://www.excelbanter.com/excel-programming/422876-conditional-formatting-more-than-3-options.html)

aswal

Conditional Formatting with more than 3 options
 
Dear Team

Kindly provide me the way , hat how can i use conditional formatting
with more than 3 options.

Manish ASwal

Per Jessen

Conditional Formatting with more than 3 options
 
Hi

It can be done by VBA, but we need more details to guide you.

What's the target range? Which options? etc.

Regards,
Per

"aswal" skrev i meddelelsen
...
Dear Team

Kindly provide me the way , hat how can i use conditional formatting
with more than 3 options.

Manish ASwal



Simon Lloyd[_1000_]

Conditional Formatting with more than 3 options
 

You can use Select Case statement like this:

Code:
--------------------
Dim Cel As Range
For Each Cel In Range("A1:E41") '''change the range to suit
*Select* *Case* Cel.Value
*Case* Is =""
Cel.Interior.ColorIndex = xlNone
*Case* Is = "1"
Cel.Interior.ColorIndex = 3
*Case* Is = "2"
Cel.Interior.ColorIndex = 5
*Case* Is = "3"
Cel.Interior.ColorIndex = 6
''''''The above *case* is statement can just be extended for as many as you need
End *Select*
Next Cel

--------------------
aswal;194784 Wrote:
Dear Team

Kindly provide me the way , hat how can i use conditional formatting
with more than 3 options.

Manish ASwal



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=53723



All times are GMT +1. The time now is 01:05 AM.

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