you can copy the filterd data to another location and do the calculaltions.
this is one way. you can get the unieue values by advance filter and then
create a macro for filtering and copying filtered data.and even doing the calcualtions.
these are some ideas on which you may work.