A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Excel Conditional Formatting -- more than 4 conditions by row



 
 
Thread Tools Display Modes
  #1  
Old June 28th, 2007, 03:35 PM posted to microsoft.public.excel.worksheet.functions
[email protected]
external usenet poster
 
Posts: 1
Default Excel Conditional Formatting -- more than 4 conditions by row

Hello,

I have been searching for the answer to the problem of more than 4
conditions and formatting the entire row.

EG:

date status Name Phone#


there are 6 different possible "status" and I would like all of the
data in the row formatted the same.
I have seen VB that will take care of the more than 3 conditions but
the code I have only formats by cell.

can anyone help?

Best Regards,
Heather

  #2  
Old June 28th, 2007, 04:20 PM posted to microsoft.public.excel.worksheet.functions
Gord Dibben
external usenet poster
 
Posts: 20,252
Default Excel Conditional Formatting -- more than 4 conditions by row

If you have code then you should be able to edit it to include the entire row in
your formatting.

Here is an example.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim Num As Long
Dim rng As Range
Dim vRngInput As Variant
Set vRngInput = Intersect(Target, Range("D"))
If vRngInput Is Nothing Then Exit Sub
On Error GoTo endit
Application.EnableEvents = False
For Each rng In vRngInput
'Determine the color
Select Case rng.Value
Case Is = "A": Num = 10 'green
Case Is = "B": Num = 1 'black
Case Is = "C": Num = 5 'blue
Case Is = "D": Num = 7 'magenta
Case Is = "E": Num = 46 'orange
Case Is = "F": Num = 3 'red
End Select
'Apply the color to entire row
rng.EntireRow.Interior.ColorIndex = Num
Next rng
endit:
Application.EnableEvents = True
End Sub


Gord Dibben MS Excel MVP

On Thu, 28 Jun 2007 07:35:11 -0700, wrote:

Hello,

I have been searching for the answer to the problem of more than 4
conditions and formatting the entire row.

EG:

date status Name Phone#


there are 6 different possible "status" and I would like all of the
data in the row formatted the same.
I have seen VB that will take care of the more than 3 conditions but
the code I have only formats by cell.

can anyone help?

Best Regards,
Heather


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:45 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.