Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default in Excel, how to put gridline every ten rows

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.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default in Excel, how to put gridline every ten rows

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

--
Don Guillett
SalesAid Software

"badfastfan" wrote in message
...
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.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default in Excel, how to put gridline every ten rows

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.


"Don Guillett" wrote:

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

--
Don Guillett
SalesAid Software

"badfastfan" wrote in message
...
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.




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default in Excel, how to put gridline every ten rows

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.

"Don Guillett" wrote:


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!!
--
Don Guillett
SalesAid Software

"badfastfan" wrote in message
...
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.


"Don Guillett" wrote:

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

--
Don Guillett
SalesAid Software

"badfastfan" wrote in message
...
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.








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default in Excel, how to put gridline every ten rows

glad you are happy

--
Don Guillett
SalesAid Software

"badfastfan" wrote in message
...
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.

"Don Guillett" wrote:


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!!
--
Don Guillett
SalesAid Software

"badfastfan" wrote in message
...
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.


"Don Guillett" wrote:

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

--
Don Guillett
SalesAid Software

"badfastfan" wrote in message
...
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.








  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,979
Default in Excel, how to put gridline every ten rows

You could add the gridlines with conditional formatting:

Turn off the gridlines (ToolsOptions, View tab)
Select all the cells on the worksheet
Choose FormatConditional 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

badfastfan wrote:
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.



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

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,979
Default in Excel, how to put gridline every ten rows

Thanks Don!

Don Guillett wrote:
Debra, As usual, a great solution without creating file bloat.



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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
The increase number of rows in Excel wise_man Excel Discussion (Misc queries) 12 January 17th 07 02:38 PM
Rows & Columns in Excel seadragon69 Excel Worksheet Functions 2 December 7th 05 05:54 PM
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER MEGTOM New Users to Excel 5 October 27th 05 03:06 AM
Excel Range Value issue (Excel 97 Vs Excel 2003) Keeno Excel Discussion (Misc queries) 2 June 13th 05 02:01 PM
Can Excel "slide up" rows with content thru empty rows to condense portly44 Excel Worksheet Functions 2 April 1st 05 12:47 AM


All times are GMT +1. The time now is 04:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"