I am trying to run a macro that will select data that matchs certain criteria for a list of names from a selected sheet and then sub-total this data in another sheet. The macro runs fin for most names in the list but comes up with a run time error when a name in the list has not data to sub-total. The error is as follows:
Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(10), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
Is there any way to get the macro to ignore names that have no data?
Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(10), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
Is there any way to get the macro to ignore names that have no data?