Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies. Only from Platform Scholar.
Sub AddGroupAndTotalsAndUnderlines() ' ' Run after SeparateGroups ' Put BM's name on bolded line, and add bolded totals for each group. ' Also underline totals. It doesn't work correctly. Just 1 cell is underlined. ' ' Dim rng As Range Application.ScreenUpdating = False For Each rng In Range("A:A").SpecialCells(xlCellTypeConstants, 2).Areas If rng.Cells(1).Row <> 1 Then rng.Cells(1).Copy rng.Cells(1).Offset(-1, 2) With rng.Cells(1).Offset(-1, 2).Font .Bold = True .Size = 14 .Name = "Calibri" End With rng.Cells(rng.Rows.Count + 1).Offset(0, 5).Resize(, 8).FormulaR1C1 = "=SUM(R[-" & rng.Rows.Count & "]C:R[-1]C)" rng.Cells(rng.Rows.Count + 1).Offset(0, 5).Resize(, 8).Font.Bold = True With rng.Cells(rng.Rows.Count + 1).Offset(0, 5).Borders(xlEdgeBottom) .LineStyle = xlContinuous .ColorIndex = 0 .TintAndShade = 0 .Weight = xlThin End With End If Next rng Application.ScreenUpdating = True End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.