Dim sel As Long
Range("B9").Select
Range(Selection, Selection.End(xlToRight)).Select
sel = Selection.Columns.Count
ActiveSheet.PivotTables("EventPivot").PivotFields("Hosts").AutoSort _
xlDescending, "Count of Incident.Incident ID", ActiveSheet.PivotTables( _
"EventPivot").PivotColumnAxis.PivotLines("sel"), 1
"sel" is this even possible here? Yes, it didnt work.. Please let me know how to make it work with any syntax corrections
sorry if Im dumb.
Thanks in advance!!
Regards
KG
Range("B9").Select
Range(Selection, Selection.End(xlToRight)).Select
sel = Selection.Columns.Count
ActiveSheet.PivotTables("EventPivot").PivotFields("Hosts").AutoSort _
xlDescending, "Count of Incident.Incident ID", ActiveSheet.PivotTables( _
"EventPivot").PivotColumnAxis.PivotLines("sel"), 1
"sel" is this even possible here? Yes, it didnt work.. Please let me know how to make it work with any syntax corrections
sorry if Im dumb.
Thanks in advance!!
Regards
KG
Last edited: