View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Johnnyboy5[_2_] Johnnyboy5[_2_] is offline
external usenet poster
 
Posts: 99
Default Borders around cells with data in them

On Jan 22, 3:13*pm, Don Guillett Excel MVP
wrote:
Sub BorderRange()
With ActiveSheet
la = .Cells.Find("*", Cells(Rows.Count, Columns.Count) _
, , , xlByRows, xlPrevious).Address
.Range("a1:" & la).Borders.LineStyle = xlContinuous
End With
End Sub

On Jan 22, 7:25*am, Johnnyboy5 wrote:

I would like a macro to automatically put a border around any cells in
a sheet that has data in it (numbers or text)


and cells with no data have no borders.


thanks


Johnnboy


Thanks Don for your reply -