I have this bit of code that creates a subtotal line:
'Add Total row Job Report
Dim lastrow2 As Long
lastrow2 = Cells(Rows.Count, "I").End(xlUp).Row
Cells(lastrow2 + 2, "I").Resize(1, 31) = "=SUBTOTAL(9,I2:I" & lastrow2 & ")"
With Range("I" & lastrow2 + 2, "AM" & lastrow2 + 2).Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThick
End With
How can I modify it so that the numbers are in currency or $#,##0.00 format. I feel like this should be relatively easy, but I'm not getting it so I must be missing something.
'Add Total row Job Report
Dim lastrow2 As Long
lastrow2 = Cells(Rows.Count, "I").End(xlUp).Row
Cells(lastrow2 + 2, "I").Resize(1, 31) = "=SUBTOTAL(9,I2:I" & lastrow2 & ")"
With Range("I" & lastrow2 + 2, "AM" & lastrow2 + 2).Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThick
End With
How can I modify it so that the numbers are in currency or $#,##0.00 format. I feel like this should be relatively easy, but I'm not getting it so I must be missing something.