U can try SUMIFS Function u will get what u r looking for...