View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
AGnes AGnes is offline
external usenet poster
 
Posts: 7
Default find last row, add "Total" in col B & border

It works! Thanks for your help.

-Agnes

"Norman Jones" wrote:

Hi AGnes,

Try:

Sub Tester()
Dim LRow As Long
Dim Rng As Range

LRow = _
Cells.Find("*", [A1], , , xlByRows, xlPrevious).Row

Cells(LRow + 1, "B").Value = "Total"
Set Rng = Range(Cells(LRow + 1, "C"), _
Cells(LRow + 1, "O"))

With Rng.Borders(xlEdgeBottom)
.LineStyle = xlDouble
.ColorIndex = xlAutomatic
End With
End Sub

---
Regards,
Norman



"AGnes" wrote in message
...
I want to find the last row in a worksheet, then add the text "Total" under
column B, and add a border from column C thru O:

.Borders(xlEdgeBottom)
.LineStyle = xlDouble

How can I select the range?

-Agnes