View Single Post
  #7   Report Post  
Bob Phillips
 
Posts: n/a
Default

Exactly what I said.

A small tweak to my code to start at line 2 works fine

Sub ColourRows()
Dim sVal
Dim i As Long
Dim nCol As Long

sVal = Range("A2").Value
nCol = 35
For i = 2 To Cells(Rows.Count, "A").End(xlUp).Row
With Cells(i, "A")
If .Value < sVal Then
If nCol = 35 Then
nCol = xlColorIndexNone
sVal = .Value
Else
nCol = 35
End If
End If
.EntireRow.Interior.ColorIndex = nCol
End With
Next i
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"reno" wrote in message
...
I did not make myelf clear. here is a sample of the actual data

LN SID# Bnr Date D FG OH 1 MFS 07/13/04 Tue
2 1 MFS 07/17/04 Sat
3 1 MFS 09/02/04 Thu 17
4 1 MFS 09/16/04 Thu 15
5 1 MFS 10/26/04 Tue 14
6 1 MFS 12/16/04 Thu 12
7 1 MFS 01/18/05 Tue 12
8 1 MFS 03/10/05 Thu Y 15
9 1 MFS 04/28/05 Thu Y 11
10 1 MFS 04/28/05 Thu Y 11
11 1 MFS 07/19/05 Tue 10
12 3 MFS 07/12/05 Tue 7
13 4 MFS 07/13/04 Tue
14 4 MFS 09/03/04 Fri 10
15 4 MFS 11/09/04 Tue 4
16 4 MFS 11/09/04 Tue 4
17 4 MFS 01/05/05 Wed 12
18 4 MFS 03/09/05 Wed Y 7
19 4 MFS 06/07/05 7 Y 4
20 5 MFS 07/16/04 Fri
What I want to do is group by alternating colors based on the account
number. The SIDS are unique and not necessarily consecutive, in this

example
there is no acct# 2. In the above example all SID 1 is green, the next

SID,3
in this case would be green and forth.
Conditional is problematic, since the SIDs are not consecutive, this would
give the effect of odd/even. In this case SIDs both SIDs 1& 3 above would

be
green using the MOD argument.

Is this a little more clear?
Thanks