Possibly (it depends on what you mean by contains data):
Dim rng as Range, rng1 as Range, rng2 as Range
On Error resume Next
set rng1 = Columns("A:C").specialCells(xlFormulas)
set rng2 = Columns("A:C").specialCells(xlConstants)
On Error goto 0
if not rng1 is nothing then
if not rng2 is nothing then
set rng = Union(rng1,rng2)
else
set rng = rng1
end if
Else if not rng2 is nothing then
set rng = rng2
End if
If not rng is nothing then
set rng = Intersect(Columns("A:C"),rng.Entirerow)
' now put your borders to rng
end if
--
Regards,
Tom Ogilvy
"STEVEB" wrote in
message ...
Does Anyone have suggestions for adding borders to a range of cells that
vary each day?
My current spreadsheet adds borders to Columns A:C including cells that
don't have any data. Is there a way to add borders to only the rows
that have cells with data? Also, is there a way to highlight the odd
number rows with data?
Thanks
--
STEVEB
------------------------------------------------------------------------
STEVEB's Profile:
http://www.excelforum.com/member.php...fo&userid=1872
View this thread: http://www.excelforum.com/showthread...hreadid=390997