the attached spreadsheet includes a pivot table with calculated items, difference between Critical and TOA. If both the Critical and TOA are blank, I don't want to take the difference, this way the rows won't be created. When I minimize the rows (column A) by clicking the minus (-) sign, the sheet recalculates the formulas. It's not too bad on this sample sheet, but takes almost 5 minutes on my complete sheet. Within the calculated item I tried, if(and(Crititcal <>"",TOA <>""),Critical '-'TOA,""). However it didn't work and I'm wondering if I'm able to use an If statement within the calculated item? Is it possible to write a macro or VBA to collapse the rows with no data?