Formatting within a Macro

K

KalliKay

I have the following reporting columns:

Prop# Owner Entity Prop Name Rentable SqFt Pkg Spaces

100-0001 OWNER1 PROP1 1,000 50
100-0002 OWNER1 PROP2 2,000 0
100-0003 OWNER1 PROP3 3,000 100

100-0004 OWNER2 PROP1 4,000 25
100-0005 OWNER2 PROP2 5,000 75

100-0006 OWNER3 PROP1 6,000 0

From within an Excel macro I am subtotalling the Rentable SqFt and Pkg Spaces
when the Owner Entity changes. What I need to know now is how to incorporate
double underlining and bolding the subtotals only.

Thanks.
 
P

Patrick Molloy

please show us the macro code
It should be simplistic to add a couple of lines to do the emboldening and
lines
 
K

KalliKay

KalliKay said:
I have the following reporting columns:

Prop# Owner Entity Prop Name Rentable SqFt Pkg Spaces

100-0001 OWNER1 PROP1 1,000 50
100-0002 OWNER1 PROP2 2,000 0
100-0003 OWNER1 PROP3 3,000 100

100-0004 OWNER2 PROP1 4,000 25
100-0005 OWNER2 PROP2 5,000 75

100-0006 OWNER3 PROP1 6,000 0

From within an Excel macro I am subtotalling the Rentable SqFt and Pkg Spaces
when the Owner Entity changes. What I need to know now is how to incorporate
double underlining and bolding the subtotals only.

Thanks.
 
K

KalliKay

Sub MgdSubTotals()
'

Dim lngRow As Long, lngTemp As Long

lngRow = 7
lngTemp = lngRow - 1
Sheets("Mgd Props").Select

Do While Range("C" & lngRow) <> ""
If Range("C" & lngRow) <> Range("C" & lngRow - 1) Then
Rows(lngRow).Insert
Range("F" & lngRow) = "=sum(F" & lngTemp & ":F" & lngRow - 1 & ")"
Range("g" & lngRow) = "=sum(g" & lngTemp & ":g" & lngRow - 1 & ")"
lngRow = lngRow + 1: lngTemp = lngRow
End If
lngRow = lngRow + 1
Loop
Range("F" & lngRow) = "=sum(F" & lngTemp & ":F" & lngRow - 1 & ")"
Range("g" & lngRow) = "=sum(g" & lngTemp & ":g" & lngRow - 1 & ")"

End Sub
 
Top