try this?
Sub insertline()
For Each c In Range("a2:a100")
If UCase(c) = "TOTAL" Then
With c.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End If
Next c
End Sub

Signature
Don Guillett
SalesAid Software
dguillett1@austin.rr.com
> How can I set up the procedure (formatting, macro, whatever) to place a
> gridline every ten rows on my spreadsheets? Or, how can I get it to put a
> gridline at every TOTAL line, when I apply subtotals? I have EXCEL 97.
badfastfan - 03 Nov 2006 15:01 GMT
I could not get what you sent to work, but that is probalby me rather than
Excel. So I asked a couple others at work to look at it. After a few
versions based on what you gave me, this is what we came up with to put a
line every ten rows.
Sub insertline()
Dim x As Long
For Each c In Rows
x = x + 1
If x Mod 10 = 0 Then
With c.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End If
Next c
End Sub
Thank you so much.
> try this?
> Sub insertline()
[quoted text clipped - 12 lines]
> > gridline every ten rows on my spreadsheets? Or, how can I get it to put a
> > gridline at every TOTAL line, when I apply subtotals? I have EXCEL 97.
Don Guillett - 03 Nov 2006 22:02 GMT
What I sent was tested for any cell in col A that said Total or TOTAL or
total.
What you sent will put a line every 10 rows to the bottom of the workbook
causing BLOAT. BAD!!

Signature
Don Guillett
SalesAid Software
dguillett1@austin.rr.com
>I could not get what you sent to work, but that is probalby me rather than
> Excel. So I asked a couple others at work to look at it. After a few
[quoted text clipped - 34 lines]
>> > put a
>> > gridline at every TOTAL line, when I apply subtotals? I have EXCEL 97.
badfastfan - 04 Nov 2006 00:38 GMT
Yes it did exactly that. But I can deal with that, some of my spreadsheets
are over 35000 rows, so it is ok. And it does put the gridline across the
entire line, rather than in just one column. So all is well. Again thank
you for your help.
> What I sent was tested for any cell in col A that said Total or TOTAL or
> total.
[quoted text clipped - 38 lines]
> >> > put a
> >> > gridline at every TOTAL line, when I apply subtotals? I have EXCEL 97.
Don Guillett - 04 Nov 2006 01:29 GMT
glad you are happy

Signature
Don Guillett
SalesAid Software
dguillett1@austin.rr.com
> Yes it did exactly that. But I can deal with that, some of my
> spreadsheets
[quoted text clipped - 48 lines]
>> >> > gridline at every TOTAL line, when I apply subtotals? I have EXCEL
>> >> > 97.
You could add the gridlines with conditional formatting:
Turn off the gridlines (Tools>Options, View tab)
Select all the cells on the worksheet
Choose Format>Conditional Formatting
From the first dropdown, choose Formula Is
In the formula box, type: =MOD(ROW(),10)=0
Click the Format button
On the Borders tab, add a light grey bottom border
Click OK, click OK
> How can I set up the procedure (formatting, macro, whatever) to place a
> gridline every ten rows on my spreadsheets? Or, how can I get it to put a
> gridline at every TOTAL line, when I apply subtotals? I have EXCEL 97.

Signature
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html
Don Guillett - 04 Nov 2006 14:03 GMT
Debra, As usual, a great solution without creating file bloat.

Signature
Don Guillett
SalesAid Software
dguillett1@austin.rr.com
> You could add the gridlines with conditional formatting:
>
[quoted text clipped - 10 lines]
>> gridline every ten rows on my spreadsheets? Or, how can I get it to put
>> a gridline at every TOTAL line, when I apply subtotals? I have EXCEL 97.
Debra Dalgleish - 04 Nov 2006 16:07 GMT
Thanks Don!
> Debra, As usual, a great solution without creating file bloat.

Signature
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html