Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 121
Default Border question

I have a long spreadsheet with many customers on it.
I would like to put a line between each customer.
Problem is that each time I need it, the customers/spacing is different.
But the rows that need the line do always have a total line in it, and
they are the only rows on the spreadsheet that have a formula.
Is there a way that I can use programming to add the bottom border to
each row that has a formula in it?
Thanks a bunch for your knowledge
Joanne
  #2   Report Post  
Posted to microsoft.public.excel.programming
Art Art is offline
external usenet poster
 
Posts: 587
Default Border question

I assumed the info was in A1:A100 in Sheet2 and wrote the following code:

Sub temp()
Sheets("Sheet2").Activate
For i = 1 To 100
If Left(Cells(i, 1).Formula, 1) = "=" Then
Cells(i, 1).Borders(xlEdgeBottom).LineStyle = xlContinuous
End If
Next
End Sub

I hope this helps.

"Joanne" wrote:

I have a long spreadsheet with many customers on it.
I would like to put a line between each customer.
Problem is that each time I need it, the customers/spacing is different.
But the rows that need the line do always have a total line in it, and
they are the only rows on the spreadsheet that have a formula.
Is there a way that I can use programming to add the bottom border to
each row that has a formula in it?
Thanks a bunch for your knowledge
Joanne

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
border on last cell of page effects border on beginning cell of ne GaryE Excel Discussion (Misc queries) 0 March 23rd 09 05:47 AM
Apply bottom border only on filled cells, leaves blank cells without border? StargateFan[_3_] Excel Programming 4 April 8th 07 05:39 PM
Border question [email protected] Excel Programming 1 June 16th 06 12:30 AM
Changing the border of one cell s/n change the border of adjacent gjanssenmn Excel Discussion (Misc queries) 2 October 5th 05 08:35 PM
Border & Sum teresa Excel Programming 3 December 31st 04 06:30 PM


All times are GMT +1. The time now is 10:49 AM.

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"