I have 5 different worksheets in a workbook that is created by a dumped from an estimating program as a report. On these 5 sheets I have totaled the columns I want as dynamic ranges since the data will shrink and expand based on the estimate. I am having trouble with the correct syntax to identify columns "A" thru "M" on the last row and put a Border as a total line and turn the font to bold.
I'm totaling the columns I need to by using the "Sums Field Labor Fringe Extended Total" below for each column. However. I can't identify the range to format columns A thru M only in the last row. the "Format Last Row Field Labor" is where I left off. The Screen shot.JPG attached shows the the "Field Labor" sheets with some values. Row 11 is the Total Row in this instance. All I need to do now is figure out how to put a top thick border and turn the Font to bold.
'Sums Field Labor Fringe Extended Total
Sheets("Field Labor").Select
Dim XtndTtl As Long
XtndTtl = Range("K" & Rows.Count).End(xlUp).Row
Range("K" & XtndTtl + 1).Formula = "=Sum(K2:K" & XtndTtl & ")"
'Format Last Row Field Labor Total
Sheets("Field Labor").Select
Dim lRow As Integer
Dim lColmn As Integer
lRow = Range("A" & Rows.Count).End(xlUp).Row
lColmn = Range("A" & Columns.Count).End(xlToLeft).Column
Sheets("Field Labor").Range("A & lRow : lColmn").Borders(xlEdgeTop).Weight = xlThick
I'm totaling the columns I need to by using the "Sums Field Labor Fringe Extended Total" below for each column. However. I can't identify the range to format columns A thru M only in the last row. the "Format Last Row Field Labor" is where I left off. The Screen shot.JPG attached shows the the "Field Labor" sheets with some values. Row 11 is the Total Row in this instance. All I need to do now is figure out how to put a top thick border and turn the Font to bold.
'Sums Field Labor Fringe Extended Total
Sheets("Field Labor").Select
Dim XtndTtl As Long
XtndTtl = Range("K" & Rows.Count).End(xlUp).Row
Range("K" & XtndTtl + 1).Formula = "=Sum(K2:K" & XtndTtl & ")"
'Format Last Row Field Labor Total
Sheets("Field Labor").Select
Dim lRow As Integer
Dim lColmn As Integer
lRow = Range("A" & Rows.Count).End(xlUp).Row
lColmn = Range("A" & Columns.Count).End(xlToLeft).Column
Sheets("Field Labor").Range("A & lRow : lColmn").Borders(xlEdgeTop).Weight = xlThick