LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Conditional Formatting a whole line based on cell value

Cheers for the reply.

would I not have to do this though to each column?

"Bob Phillips" wrote:

Best to do that with event code, trigger the code when the target column
changes

As an example


'-----------------------------------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
'-----------------------------------------------------------------
Const WS_RANGE As String = "H:H" '<=== change to suit

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
Select Case .Value
Case 1: .Entirerow.Interior.ColorIndex = 3 'red
Case 2: .Entirerow.Interior.ColorIndex = 6 'yellow
Case 3: .Entirerow.Interior.ColorIndex = 5 'blue
Case 4: .Entirerow.Interior.ColorIndex = 10 'green
End Select
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Maver1ck666" wrote in message
...
Okay, I have a spreadsheet with over 1000 lines of data in all at
different
status' of progress.

What I would like to do it to highlight the whole line a certain colour
depending on the status value.

I currently have the max 3 conditional formats doing this but I need to
expand them and there are over 10 different status'.

My spreadsheet runs from A to L (with the status being I). Is there any
way
the formatting could loop to check the whole spreadsheet?

Thanks in advanced for your help.

Maver1ck666




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
conditional formatting based on the value of another cell bwilde Excel Discussion (Misc queries) 10 January 14th 10 09:38 AM
Conditional Formatting based on a cell value pcjjjr Excel Discussion (Misc queries) 4 November 28th 07 03:47 PM
conditional Formatting based on cell formatting Totom Excel Worksheet Functions 3 January 20th 07 02:02 PM
conditional Formatting based on cell formatting Totom Excel Worksheet Functions 0 January 15th 07 04:35 PM
Conditional formatting based on another cell Shaggyjh Excel Discussion (Misc queries) 7 February 10th 06 03:59 PM


All times are GMT +1. The time now is 02:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"