Code:With .Range("B" & Rows.Count).End(xlUp) .Offset(, 1).Resize(, 16).Interior.ColorIndex = 34 .Offset(, IIf(OptionButton4, 8, 13)).Resize(, 5).Interior.ColorIndex = xlNone End WithCode:Sub SubTotalize() With Sheets("XFLOW A") .Unprotect Password:="abc" .Range("B7:Q" & .Cells(Rows.Count, 2).End(xlUp).Row).Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(3, 4, 7, 12, 16), Replace:=True, PageBreaks:=False, SummaryBelowData:=True With .Range("B" & Rows.Count).End(xlUp) .Offset(-1, 1).Resize(2, 16).Interior.ColorIndex = xlNone End With .Protect UserInterfaceOnly:=True, Password:="abc" End With End Sub




Reply With Quote
Bookmarks