Conditional Formating

Sashi.Bats

New Member
Joined
Sep 14, 2008
Messages
2
Hello All

As in Excel we can only do the 3 conditional formating in one perticular cell, is there any formula by which i can do more then 3 Conditional formating.

For e.g. in cell A1 - if i have 5 data as in A, B, C, D, F and if i choose A the colour will be Red, B, as Yellow, C as Green, D as blue and F as pink.

Thanks
Sashi
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Hello All

As in Excel we can only do the 3 conditional formating in one perticular cell, is there any formula by which i can do more then 3 Conditional formating.

For e.g. in cell A1 - if i have 5 data as in A, B, C, D, F and if i choose A the colour will be Red, B, as Yellow, C as Green, D as blue and F as pink.

Thanks
Sashi
need help
 
Upvote 0
To get more than three formats, you will probably have to use a macro. With a macro, I don't think there is an upper limit.
 
Upvote 0
Hello and welcome to MrExcel.

Right click the sheet tab, select View Code, and paste in

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim iCol As Integer
If Target.Address(False, False) = "A1" Then
    Select Case Target.Value
        Case "A": iCol = 3
        Case "B": iCol = 6
        Case "C": iCol = 4
        Case "D": iCol = 5
        Case "F": iCol = 7
        Case Else: iCol = xlNone
    End Select
    Target.Interior.ColorIndex = iCol
End If
End Sub

then close the code window using the X. Try typing one of your letters into A1.

I suspect that you want more than just A1 and those letters so please explain further.

And what happened to "E" :confused:
 
Upvote 0
I hate to leave it at "..for some reason". A quick look at Wikipedia suggests that the E was dropped to avoid confusion with an earlier system in which E stood for Excellent.
 
Upvote 0
I hate to leave it at "..for some reason". A quick look at Wikipedia suggests that the E was dropped to avoid confusion with an earlier system in which E stood for Excellent.

Well, I've never left the USA, but I always did wonder about that. I
figured that since there was a one letter gap between the two,
nobody would ever get confused about an F! I've only gotten a few
in my years of schooling, but it is annoying to a kid wondering about
why he/she can't just get an E?

Even so, for some reason I always felt that an "F" just meant, well
what "F" stands for in most English-speaking countries. I always felt
like I got F* because I'm an idiot, but of course now I know that's
not true... The idiot part, that is.
 
Upvote 0

Forum statistics

Threads
1,215,455
Messages
6,124,937
Members
449,195
Latest member
Stevenciu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top