View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default Totally stuck trying to format,loop etc...please help a novice

See if you can work with this:

Sub sist()
Dim rng As Range, x As Long, c As Range

Set rng = ActiveSheet.Range("E11:E71")
For Each c In rng
If c.Value <= Now then
x = x + 1
c.Offset(0, 2) = x
c.Offset(0, 2).Interior.ColorIndex = 10
ElseIf c.Value Now Then
x = 0
c.Offset(0, 2) = x
c.Offset(0, 2).Interior.ColorIndex = 3
End If
End Sub

Not sure if I have the comparisons to Now in the right order, but you can
change those.

"SAM" wrote in message
...
my actual data is in cell e11:e71..if the next value on is a continuation
of
the series (either +1, or -1) i want it to know to label the 0 as a
continuation of the series...?

do you have an email?

"ytayta555" wrote:

On 22 Iul, 20:26, ytayta555 wrote:

Something in your Step 1 is not logical , if the value is
< or = , or , or = , in the case the value is
equal ,
you always shall have the color red or green ( not shure ) .
Maybe you must put one more condition , such as , if value is
equal to the value at time minus 4 cells earlier , then ,
value to be "x" and color ... how you want .