robertwp7472
New member
So this is what I took from that:
Is this correct?
[/FONT]
Code:
[FONT="] 'work with each unique [/FONT]
[FONT="] For j = 0 To d.Count - 1[/FONT]
[FONT="] If d.keys()(j) <> "" Then[/FONT]
[FONT="] crit = d.keys()(j)[/FONT]
[FONT="] '"L" total for this MS[/FONT]
[FONT="] Ltot = Application.WorksheetFunction.SumIf(.Range("H6:H" & lr), crit, Range("L6:L" & lr))[/FONT]
[FONT="] 'filter for this MS[/FONT]
[FONT="] filtRng.AutoFilter Field:=1, Criteria1:=crit[/FONT]
[COLOR=#008000][FONT="] 'put L total in last[B] P[/B] showing[/FONT][/COLOR]
[FONT="] .Cells(GetFilteredRangeBottomRow, [B]"P"[/B]).Value = Ltot[/FONT]
[FONT="] End If[/FONT]
[FONT="] Next j[/FONT]
[FONT="] [/FONT]
[COLOR=#008000][FONT="] 'remove last filter[/FONT][/COLOR]
[FONT="] filtRng.AutoFilter[/FONT]
[COLOR=#008000][FONT="] ' show results[/FONT][/COLOR]
[COLOR=#008000][FONT="] ' filtRng.AutoFilter Field:=4, Criteria1:=">0" (I Commented this out rather than remove in case i misread)[/FONT][/COLOR]
[FONT="]End With[/FONT]
[FONT="]Application.ScreenUpdating = True[/FONT]
[FONT="] [/FONT]
[FONT="]End Sub
Is this correct?
[/FONT]