Calculating average based on required criteria

SColyn

New Member
Joined
May 12, 2016
Messages
19
Good day,

I require assistance please.

I have to calculate an average based on the monthly contract data.

We have a Hit rate per customer per month and some of our customer have contracts with us, but the contracts were not implemented the beginning of the year. Some were only implemented August / September.

I have to show the Hit rate average for contract customer and non contract customers but I have to show the months the customer did not have a contract under non contract and visa versa.

I am a blank with how to calculate this and would appreciate guidance.

Below is the Pivot table (and I use to filter on Contracts "Yes / No", but have to include accurate results and cannot do it this way anymore)
ContractYes
Sum of Hit RateMonthsDate
JanFebMarAprMayJulAugSep
Market CompanyCustomer Plant
South AfricaCUSTOMER 1 BOTSWANA0%0%0%0%50%75%75%75%
CUSTOMER 10 SOUTHERN AFRICA BOKSBURG****100%100%100%100%
CUSTOMER 7 LUSAKA*0%0%0%50%75%50%60%
South Africa Total0%0%0%0%57%80%73%77%

<tbody>
</tbody><colgroup><col><col><col span="8"></colgroup>


Below is the data (but the last column "Contract" is a vlookup from the Contract data sheet and only shows the current status)
Country and Business AreaCustomer PlantLine CodeAsset CodeSerial NumberTotal Potential EventsTP Completed Events (Hits)DateContract
Botswana CartonCUSTOMER 1 BOTSWANABWC-CUSTOMER 1 GAB-LN Y900003087120134/8133910Jan-17Yes
Botswana CartonCUSTOMER 1 BOTSWANABWC-CUSTOMER 1 GBR-LN G900005071613372/1123000Jan-17Yes
Botswana CartonCUSTOMER 1 BOTSWANABWC-CUSTOMER 1 GBR-LN S900004989120179/8178500Jan-17Yes
Botswana CartonCUSTOMER 1 BOTSWANABWC-CUSTOMER 1 GBR-LN W900003086520134/8133300Jan-17Yes
Botswana CartonCUSTOMER 1 BOTSWANABWC-CUSTOMER 1 GBR-LN G900005071613372/1123000May-17Yes
Botswana CartonCUSTOMER 1 BOTSWANABWC-CUSTOMER 1 GBR-LN S900004989120179/8178511May-17Yes
Botswana CartonCUSTOMER 1 BOTSWANABWC-CUSTOMER 1 GBR-LN W900003086520134/8133311May-17Yes
Botswana CartonCUSTOMER 1 BOTSWANABWC-CUSTOMER 1 GBR-LN Y900003087120134/8133920May-17Yes
Botswana CartonCUSTOMER 1 BOTSWANABWC-CUSTOMER 1 GBR-LN G900005071613372/1123000Aug-17Yes
Botswana CartonCUSTOMER 1 BOTSWANABWC-CUSTOMER 1 GBR-LN S900004989120179/8178511Aug-17Yes
Botswana CartonCUSTOMER 1 BOTSWANABWC-CUSTOMER 1 GBR-LN W900003086520134/8133311Aug-17Yes
Botswana CartonCUSTOMER 1 BOTSWANABWC-CUSTOMER 1 GBR-LN Y900003087120134/8133921Aug-17Yes
Botswana CartonCUSTOMER 1 BOTSWANABWC-CUSTOMER 1 GBR-LN G900005071613372/1123000Sep-17Yes
Botswana CartonCUSTOMER 1 BOTSWANABWC-CUSTOMER 1 GBR-LN S900004989120179/8178511Sep-17Yes
Botswana CartonCUSTOMER 1 BOTSWANABWC-CUSTOMER 1 GBR-LN W900003086520134/8133311Sep-17Yes
Botswana CartonCUSTOMER 1 BOTSWANABWC-CUSTOMER 1 GBR-LN Y900003087120134/8133921Sep-17Yes

<tbody>
</tbody><colgroup><col><col><col><col><col><col><col><col><col></colgroup>

Below is my Contract data sheet
Market CompanyAsset CodeContractJan-17Feb-17Mar-17Apr-17May-17Jun-17Jul-17Aug-17Sep-17Oct-17Nov-17Dec-17
South Africa9000049829No000000000000
South Africa9000049838No000000000000
South Africa9000052726No000000000000
South Africa9000049835No000000000000
South Africa9000079618No000000000000
South Africa9000079619No000000000000
South Africa9000085414No000000000000
South Africa9000079618No000000000000
South Africa9000079619No000000000000
South Africa9000085414No000000000000
South Africa9000030871Yes000000011111
South Africa9000049891Yes000000011111
South Africa9000050716Yes000000011111
South Africa9000030871Yes000000011111
South Africa9000049891Yes000000011111
South Africa9000030865Yes000000011111

<tbody>
</tbody><colgroup><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup>
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Forum statistics

Threads
1,214,950
Messages
6,122,428
Members
449,083
Latest member
Ava19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top