Without seeing an example it's a little difficult. Maybe a PivotTable might be more efficient.