You can do this using Conditional Formatting.
Select the entire range, in your case A1:F30 (If you have headings then select A2:F30). Now goto Format - COnditional formating, and select formula.
Type =$A2<>$A3
and in the pattern, select borders, and activate the bottom border.
If you NEED to do this in VB let me know.
Juan Pablo
Unfortunately, I'm already using 3 Conditional formats for the cells and Excel only allows 3. So, I can't add one more. And yes, I do need to do this in VB. Thanks!
Ok then, try something like this.
Sub Borders()
Dim F As Long
Dim C As Integer
Dim i As Long
F = Range("A65536").End(xlUp).Row
C = Range("IV2").End(xlToLeft).Column
For i = 2 To F 'Starts in Row 2 and goes to the end of file
If Cells(i, 1) <> Cells(i + 1, 1) Then
Range(Cells(i, 1), Cells(i, C)).Borders(xlEdgeBottom).Weight = xlMedium
End If
Next i
End Sub
Juan Pablo
That worked! Thanks a bunch. Such quick responses... this was a great help.