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 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -