Hi Guys,

I have encountered the following problem which I'm breaking my head over.

I have this formula:
Code:
=SUMPRODUCT(--(ISNA(MATCH(PaxData[Sector],Parameters!$C$5:$C$61,0))),--(PaxData[Driver]=Analysis!B6),--(PaxData[Date]>=Analysis!$C$1),--(PaxData[Date]<=Analysis!$C$2),PaxData[Pax])
Where PaxData is a table consisting of following columns: Driver - Date - Thread - Sector - Pax
Where Parameter!C5:C61 is a list of sectors to exclude,
Analysis!B6 is the driver to return results for,
AnalysisC1 and C2 are the start and end date of the desired period.

Now this is working fine, it return me the sum of passengers:
- Not in the ecluded sectors
- For the driver in B6
- Between the desired dates

But, I would like to change something in this. Some records have the same date, whihc gives me a skewed result, so what I would like to achieve is to have above criteria, but when that returns 2 or more numbers from the same date, that it takes the average of those. Now I have tried to modify the formula, but I obviously having idea what I'm doing, I've come up with following.

Code:
=SUMPRODUCT(--(ISNA(MATCH(PaxData[Sector],Parameters!$C$5:$C$61,0))),--(PaxData[Driver]=Analysis!B5),--(PaxData[Date]>=Analysis!$C$1),--(PaxData[Date]<=Analysis!$C$2),--(IF(PaxData[Date]=PaxData[Date],AVERAGE(PaxData[Pax]),PaxData[Pax])))
Does anyone knows if it is possible what i'm trying to achieve? and if so, how?

Any help will be much appreciated!


Thanks heaps!