PC Review


Reply
Thread Tools Rate Thread

Border question

 
 
Joanne
Guest
Posts: n/a
 
      12th Apr 2007
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 With Quote
 
 
 
 
=?Utf-8?B?QXJ0?=
Guest
Posts: n/a
 
      12th Apr 2007
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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paragraph Border Question bluedolphin Microsoft Word Document Management 3 7th Jan 2009 03:22 PM
3D border question Quinn Microsoft Dot NET Framework 2 4th Jun 2007 06:56 PM
Border question kramer.newsreader@gmail.com Microsoft Excel Programming 1 16th Jun 2006 12:30 AM
Body of page appears in Top Border, Left Border and Bottom Border (there is no right border) Michael Edwards Microsoft Frontpage 1 14th Oct 2004 09:46 AM
Shared Border question Nick Ravo Microsoft Frontpage 0 30th Jul 2003 02:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:12 PM.