excel - How to underline the last row before the counta total? -
so figured much:
dim mylastrow long 'find last row in column mylastrow = cells(rows.count, "a").end(xlup).row ' insert count after last cell in column cells(mylastrow + 1, "a").formula = "=counta(a2:a" & mylastrow & ")"
this count column , put total on bottom. how underline last row before total?
this should trick.
dim mylastrow long 'find last row in column mylastrow = cells(rows.count, "a").end(xlup).row 'insert count after last cell in column cells(mylastrow + 1, "a").formula = "=counta(a2:a" & mylastrow & ")" cells(mylastrow + 1, "a").borders(xledgetop) .linestyle = xlcontinuous .colorindex = xlautomatic .tintandshade = 0 .weight = xlmedium end