Don's code stops at the last used cell in column A.
How do you know when class 1 ends?
Maybe just selecting the range in column A, then running the code would be
sufficient?
Sub puttick()
dim C as range
For Each c In Selection.cells
If Len(c) 0 And IsNumeric(c) Then
With c.Offset(, 1)
.Value = "a"
.Font.Name = "Marlett"
End With
End If
next c
end sub
Or maybe you can check the value in another cell in that row?
Sub puttick()
Dim c As Range
For Each c In Range("a2:a" & Cells(Rows.Count, "a").End(xlUp).Row)
if lcase(c.offset(0,4).value) < "class 1" then
exit for
end if
If Len(c) 0 And IsNumeric(c) Then
With c.Offset(, 1)
.Value = "a"
.Font.Name = "Marlett"
End With
End If
Next c
End Sub
I used c.offset(0,4). This is 4 columns to the right of column A--or column E.
Adjust that as necessary.
ps. Lots of people connect directly to the MS NewsServers. They don't see your
attachment. (I'm one of those people.)
mevetts wrote:
Hi Dave,
I tried the code out, but it put ticks in column B and didn't stop at
the end of class one, but carried on down all of the other classes
below on the same sheet.
This seems to be proving a very tricky task. I only wish my knowledge
was greater so I could assist you more.
Any other ideas?
Mark.
--
mevetts
------------------------------------------------------------------------
mevetts's Profile: http://www.excelforum.com/member.php...o&userid=29130
View this thread: http://www.excelforum.com/showthread...hreadid=497252
--
Dave Peterson