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

I want to try to "box" the same customer by adding top border line and
bottom border line. I just want to improve readability for fun.

A long data list looks like

AAAAA
AAAAA
BBBBB
CCCCC
CCCCC
CCCCC

Any ideas or codes to share?

Thanks in advance

H. Z.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Add Borderlines

This will add a thick bottom border at each change of customer.

Sub Border_At_Change()
Dim LastRow As Long
Dim X As Long
LastRow = Cells(Rows.Count, 1).End(xlUp).Row
Application.ScreenUpdating = False

For X = LastRow To 3 Step -1
If Cells(X, 1).Value < Cells(X - 1, 1).Value Then
If Cells(X, 1).Value < "" Then
If Cells(X - 1, 1).Value < "" Then
With Cells(X - 1, 1).Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThick
.ColorIndex = xlAutomatic
End With
End If
End If
End If
Next X
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP

On Wed, 27 Aug 2008 16:18:18 -0700 (PDT), Curious wrote:

I want to try to "box" the same customer by adding top border line and
bottom border line. I just want to improve readability for fun.

A long data list looks like

AAAAA
AAAAA
BBBBB
CCCCC
CCCCC
CCCCC

Any ideas or codes to share?

Thanks in advance

H. Z.


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 Borderlines Print out in the wrong spots. bruce Excel Discussion (Misc queries) 1 April 24th 08 06:39 PM
printing borderlines רוזנט Charts and Charting in Excel 4 January 19th 06 05:39 AM
Is it possible to reduce the weight of borderlines? If so, how? Suzieq1 Excel Discussion (Misc queries) 2 February 25th 05 03:15 PM


All times are GMT +1. The time now is 11:15 AM.

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

About Us

"It's about Microsoft Excel"