Try this (just set the range, and frequency to your actual values)...
Sub BordersEvery8Rows()
Dim X As Long, R As Range, Freq As Long
Freq = 8
Set R = Range("A1:E30")
For X = Freq To R.Rows.Count Step 8
With R(1).Offset(X - 1).Resize(1,R.Columns.Count).Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Next
End Sub
--
Rick (MVP - Excel)
"ytayta555" <(E-Mail Removed)> wrote in message
news:b143966d-e47b-4b3f-b435-(E-Mail Removed)...
> Hi , and a good day to all programmers
>
> I need to have a macro to put in a range ,
> ( for example Range A1 : E 1000 ) , to every
> 8-th row , borders , like this :
>
> With Selection.Borders(xlEdgeBottom)
> .LineStyle = xlContinuous
> .Weight = xlThin
> .ColorIndex = xlAutomatic
> End With
>
> A lot of thanks in advance
|