PC Review


Reply
Thread Tools Rate Thread

conditional shading

 
 
Gary
Guest
Posts: n/a
 
      13th May 2007
The spreadsheet has 8 columns (B-I) and 25 rows. Column B has dates, the
other 7 columns various information that happened on that date. The dates
in column B might take up various numbers of rows; for example B1:B5 =
5/7/07, B6:B:7 = 5/8/07, B8:B20 = 5/9/07, B21 = 5/10/07 and B20:B25 = blank.

We wish to alternate shading of all rows associated with one date. For
example using the above scenario the rows associated with; B1:B5 = green,
B6:B7 = yellow, B8:B20 = green, B21 = yellow and B20:B25 = no color.

Is there a conditional format that can accomplish this?

Regards,
Gary



 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      13th May 2007
right click sheet tab>view code>insert this>change colors to suit>put dates
in range(b1:b4) or put dates into macro itself instead of range.

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("b7:b77")) Is Nothing Then
Select Case Target.Value
Case Is = Range("b1"): x = 3
Case Is = Range("b2"): x = 5
Case Is = Range("b3"): x = 6
Case Is = Range("b4"): x = 7
Case Else
End Select
Rows(Target.row).Interior.ColorIndex = x
End If
End Sub

--
Don Guillett
SalesAid Software
(E-Mail Removed)
"Gary" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> The spreadsheet has 8 columns (B-I) and 25 rows. Column B has dates, the
> other 7 columns various information that happened on that date. The dates
> in column B might take up various numbers of rows; for example B1:B5 =
> 5/7/07, B6:B:7 = 5/8/07, B8:B20 = 5/9/07, B21 = 5/10/07 and B20:B25 =
> blank.
>
> We wish to alternate shading of all rows associated with one date. For
> example using the above scenario the rows associated with; B1:B5 = green,
> B6:B7 = yellow, B8:B20 = green, B21 = yellow and B20:B25 = no color.
>
> Is there a conditional format that can accomplish this?
>
> Regards,
> Gary
>
>
>


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Shading Areas =?Utf-8?B?VGltIEg=?= Microsoft Excel Charting 1 30th May 2007 11:35 PM
Conditional Cell Shading (based on the shading of other cells) =?Utf-8?B?VHViYnk=?= Microsoft Excel Worksheet Functions 2 20th Jun 2006 10:03 PM
conditional formatting-shading =?Utf-8?B?U2hvb3Rlcg==?= Microsoft Excel Worksheet Functions 2 23rd Feb 2005 08:32 PM
Conditional Formatting: Shading??? mcr1 Microsoft Excel Misc 1 10th Nov 2004 10:34 AM
conditional shading? =?Utf-8?B?Y2Ftcm9uMTA3?= Microsoft Excel Misc 3 20th Jul 2004 12:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:00 PM.