As it turns out there was some kind of strange formatting on the file. It did not register the cells that I was visually seeing as blank to be blank (I hope this makes sense). I ended up copying the data to another sheet and restoring a format that would read blank cells.... This is the resulting code that works:
Code:Sub Part1of4() Columns("A:E").Select Selection.Copy Sheets.Add After:=Sheets(Sheets.Count) Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _ xlNone, SkipBlanks:=False, Transpose:=False End Sub Sub Part2of4() Dim i As Integer, LastRow As Integer 'Group Cells in between blanks in column 5 LastRow = Cells(Rows.Count, 5).End(xlUp).row For i = 2 To LastRow If Not Left(Cells(i, 5), 3) = "" Then Cells(i, 5).EntireRow.Group End If Next i End Sub Sub Part3of4() ' ' AlignUserGroupButtons Macro With ActiveSheet.Outline .AutomaticStyles = False .SummaryRow = xlAbove .SummaryColumn = xlLeft End With End Sub Sub Part4of4() 'Collapses all Groups ActiveSheet.Outline.ShowLevels RowLevels:=1, ColumnLevels:=1 End Sub Sub RunSalesByCustomer() Call Part1of4 Call Part2of4 Call Part3of4 Call Part4of4 End Sub




Reply With Quote

Bookmarks