ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Six conditional formatting possible? (https://www.excelbanter.com/new-users-excel/211351-six-conditional-formatting-possible.html)

ghinzrey

Six conditional formatting possible?
 
Is there any alternative way to create six or more conditional formatting and
how can I save my formats? User is on self study and would appreciate step by
step method on how to create if there's any. Thanks

Max

Six conditional formatting possible?
 
As an example, tinker with this sheet sub* which conditionally colors (both
fill colors and font colors) in cols A to T (20 cols) based on the numeric
values -- between 1-30, inclusive -- in col U (within U2:U100)
*from a Mike H posting

To install:
Copy the sub
Right-click on the sheet tab View Code
Paste the sub into the code window on the right
Press Alt + Q to get back to Excel
Test it out by inputting various numbers** with U2:U100
**between 1 - 30

'-------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim icolor As Integer
If Not Intersect(Target, Range("U2:U100")) Is Nothing Then
Select Case Target
Case 1 To 5
icolor = 6
fcolor = 1
Case 6 To 10
icolor = 12
fcolor = 1
Case 11 To 15
icolor = 7
fcolor = 1
Case 16 To 20
icolor = 53
fcolor = 1
Case 21 To 25
icolor = 15
fcolor = 1
Case 26 To 30
icolor = 42
fcolor = 1
Case Else
End Select
With Target
.Offset(0, -20).Resize(1, 20).Interior.ColorIndex = icolor
.Offset(0, -20).Resize(1, 20).Font.ColorIndex = fcolor
End With
End If
End Sub
'------

--
Max
Singapore
http://savefile.com/projects/236895
Downloads:20,500 Files:363 Subscribers:64
xdemechanik
---
"ghinzrey" wrote:
Is there any alternative way to create six or more conditional formatting and
how can I save my formats? User is on self study and would appreciate step by
step method on how to create if there's any. Thanks


Shane Devenshire[_2_]

Six conditional formatting possible?
 
Hi,

Can't be done in the spreadsheet in 2003, need to use VBA.

Can be done in 2007:

1. Highlight all the cells on the rows you want formatted
2. Choose Home, Conditional Formatting, Manage Rule, New Rule
3. Create the rule you need (you didn't give us any hints on this)
5. Click the Format button and choose a format, click OK once
6. Repeat as many times as necessary.
7. Click OK twice

If this helps, please click the Yes button.

Cheers,
Shane Devenshire

"ghinzrey" wrote:

Is there any alternative way to create six or more conditional formatting and
how can I save my formats? User is on self study and would appreciate step by
step method on how to create if there's any. Thanks


John C[_2_]

Six conditional formatting possible?
 
As I posted in response to your 11/13/08 post...
....Note: There is an add-in that can supposedly handle up to 30 conditional
formats located at:
http://www.xldynamic.com/source/xld.....Download.html
But I find it buggy, and has a tendency to re-format the cells with numbers
back to general (and thus removing preceding 0s). You may wanna see if you
can get it to work better than I could.
....
--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"ghinzrey" wrote:

Is there any alternative way to create six or more conditional formatting and
how can I save my formats? User is on self study and would appreciate step by
step method on how to create if there's any. Thanks



All times are GMT +1. The time now is 04:13 AM.

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