LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 163
Default Apply bottom border only on filled cells, leaves blank cells without border?

Hi StargateFan,

are you speaking of text as opposed to digits
and just characters other than a-z and A-Z?

Then, if UCase(cell.value) < LCase(cell.value)
there is at least one letter in it.

Instead of putting a border just on the cells
that have text in the selected
area, it puts a border on everything
on the rows of the selected cells
which defeats the purpose <g.


Hmm...

See also: http://tinyurl.com/2jbleh
for empty vs null vs ""

Sub Test4000B()
Dim oCll As Range
For Each oCll In ActiveSheet.UsedRange
If Not LCase(oCll.Value) = UCase(oCll.Value) Then
oCll.Borders(xlEdgeBottom).LineStyle = xlContinuous
oCll.Borders(xlEdgeBottom).Weight = xlHairline
oCll.Borders(xlEdgeBottom).ColorIndex = 1
Else
' otherwise remove border, skip this one if you like
oCll.Borders(xlEdgeBottom).LineStyle = xlNone
End If
Next
End Sub

--
Greetings from Bavaria, Germany

Helmut Weber

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"


 
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
Paste-linking cells from Excel leaves a border in PP Jack Charts and Charting in Excel 0 September 22nd 09 07:17 PM
Border at bottom of worksheet Terry Excel Discussion (Misc queries) 3 May 17th 07 08:51 PM
Repeat bottom Border Scafidel Excel Discussion (Misc queries) 3 August 29th 06 05:37 AM
Apply Border Bill Excel Programming 6 July 29th 05 12:15 AM


All times are GMT +1. The time now is 01:21 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"