G
GregR
I have this code that I want to loop through and format each found
value, not just the firtst one, How?
Sub ByPerson()
'
Selection.QueryTable.Refresh BackgroundQuery:=False
Selection.Sort Key1:=Range("D2"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Selection.Subtotal GroupBy:=4, Function:=xlSum,
TotalList:=Array(9, 22), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
ActiveSheet.Outline.ShowLevels RowLevels:=2
Set Rng = ActiveSheet.Range("D").Find(What:="Total", _
After:=Range("D"
& Rows.Count), _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
Rng.NumberFormat = "General"
End Sub
TIA Greg
value, not just the firtst one, How?
Sub ByPerson()
'
Selection.QueryTable.Refresh BackgroundQuery:=False
Selection.Sort Key1:=Range("D2"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Selection.Subtotal GroupBy:=4, Function:=xlSum,
TotalList:=Array(9, 22), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
ActiveSheet.Outline.ShowLevels RowLevels:=2
Set Rng = ActiveSheet.Range("D").Find(What:="Total", _
After:=Range("D"
& Rows.Count), _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
Rng.NumberFormat = "General"
End Sub
TIA Greg