gayjaybird
New Member
- Joined
- Aug 6, 2007
- Messages
- 39
Code:
Sub Hidesingles()
For i = 5 To ActiveSheet.UsedRange.Rows.Count
For c = 3 To ActiveSheet.UsedRange.Column.Count
If Cells(i, c) <= 1 Then Cells(i, 1).EntireRow.Hidden = True Else: Next c
End If
Next i
End Sub
I'm trying to filter a pivot table with VBA. The spreadsheet/database I'm summarizing has fields for the store name, the package tracking number, the date and the sender's store name. Row headings are store name and tracking number, and the columns are the date. The pivot table counts how many times a particular sender's store name shows up on a particular date. I have the rows collapsed so that the table only displays the subtotals for each store for each day. How can I filter the table so that only the stores who sent more than one package a day are listed? I tried the code above and ended up with a 'Next without For error.' Any ideas?