Average Revenue per month

NYEXCEL1

Board Regular
Joined
Apr 17, 2013
Messages
123
I need assistance putting together a formula in a separate column that will give me the total average retainer for each client based upon the number of months below. Since there are duplicate months i cannot simply do an average. Tried doing an average if formula but need to embed something that eliminates the duplicates. For example, Client be average should be 1000 (3000 / 3 months)

Thank you in advance



[TABLE="width: 327"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]Client[/TD]
[TD]Team[/TD]
[TD]Month[/TD]
[TD]Revenue[/TD]
[/TR]
[TR]
[TD]Client A[/TD]
[TD]Team A[/TD]
[TD]June[/TD]
[TD="align: right"]500[/TD]
[/TR]
[TR]
[TD]Client A[/TD]
[TD]Team B[/TD]
[TD]July[/TD]
[TD="align: right"]100[/TD]
[/TR]
[TR]
[TD]Client A[/TD]
[TD]Team A[/TD]
[TD]July[/TD]
[TD="align: right"]500[/TD]
[/TR]
[TR]
[TD]Client A[/TD]
[TD]Team B[/TD]
[TD]August[/TD]
[TD="align: right"]500[/TD]
[/TR]
[TR]
[TD]Client A[/TD]
[TD]Team A[/TD]
[TD]August[/TD]
[TD="align: right"]100[/TD]
[/TR]
[TR]
[TD]Client A[/TD]
[TD]Team B[/TD]
[TD]September[/TD]
[TD="align: right"]500[/TD]
[/TR]
[TR]
[TD]Client A[/TD]
[TD]Team A[/TD]
[TD]September[/TD]
[TD="align: right"]100[/TD]
[/TR]
[TR]
[TD]Client A[/TD]
[TD]Team B[/TD]
[TD]October[/TD]
[TD="align: right"]500[/TD]
[/TR]
[TR]
[TD]Client A[/TD]
[TD]Team A[/TD]
[TD]October[/TD]
[TD="align: right"]100[/TD]
[/TR]
[TR]
[TD]Client B[/TD]
[TD]Team B[/TD]
[TD]January[/TD]
[TD="align: right"]800[/TD]
[/TR]
[TR]
[TD]Client B[/TD]
[TD]Team A[/TD]
[TD]January[/TD]
[TD="align: right"]200[/TD]
[/TR]
[TR]
[TD]Client B[/TD]
[TD]Team B[/TD]
[TD]February[/TD]
[TD="align: right"]800[/TD]
[/TR]
[TR]
[TD]Client B[/TD]
[TD]Team A[/TD]
[TD]February[/TD]
[TD="align: right"]200[/TD]
[/TR]
[TR]
[TD]Client B[/TD]
[TD]Team B[/TD]
[TD]March[/TD]
[TD="align: right"]800[/TD]
[/TR]
[TR]
[TD]Client B[/TD]
[TD]Team A[/TD]
[TD]March[/TD]
[TD="align: right"]200[/TD]
[/TR]
</tbody>[/TABLE]
`
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Your formula for Client B would be
Code:
=SUMIF(A2:A16,"Client B",D2:D16)/SUMPRODUCT((A2:A16="Client B")*(C2:C16<>"")/(COUNTIFS(C2:C16,C2:C16,A2:A16,"Client B")+(A2:A16<>"Client B")))
 
Upvote 0
[TABLE="class: grid"]
<tbody>[TR]
[TD][/TD]
[TD]
A
[/TD]
[TD]
B
[/TD]
[TD]
C
[/TD]
[TD]
D
[/TD]
[TD]
E
[/TD]
[TD]
F
[/TD]
[TD]
G
[/TD]
[TD]
H
[/TD]
[TD]
I
[/TD]
[TD]
J
[/TD]
[TD]
K
[/TD]
[TD]
L
[/TD]
[TD]
M
[/TD]
[TD]
N
[/TD]
[TD]
O
[/TD]
[/TR]
[TR]
[TD]
1
[/TD]
[TD]Client[/TD]
[TD]Team[/TD]
[TD]Month[/TD]
[TD]Revenue[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]June[/TD]
[TD]July[/TD]
[TD]August[/TD]
[TD]September[/TD]
[TD]October[/TD]
[TD]January[/TD]
[TD]February[/TD]
[TD]March[/TD]
[/TR]
[TR]
[TD]
2
[/TD]
[TD]Client A[/TD]
[TD]Team A[/TD]
[TD]June[/TD]
[TD]
500​
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Client A[/TD]
[TD]
500​
[/TD]
[TD]
300​
[/TD]
[TD]
300​
[/TD]
[TD]
300​
[/TD]
[TD]
300​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
3
[/TD]
[TD]Client A[/TD]
[TD]Team B[/TD]
[TD]July[/TD]
[TD]
100​
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Client B[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]
500​
[/TD]
[TD]
500​
[/TD]
[TD]
500​
[/TD]
[/TR]
[TR]
[TD]
4
[/TD]
[TD]Client A[/TD]
[TD]Team A[/TD]
[TD]July[/TD]
[TD]
500​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
5
[/TD]
[TD]Client A[/TD]
[TD]Team B[/TD]
[TD]August[/TD]
[TD]
500​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
6
[/TD]
[TD]Client A[/TD]
[TD]Team A[/TD]
[TD]August[/TD]
[TD]
100​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
7
[/TD]
[TD]Client A[/TD]
[TD]Team B[/TD]
[TD]September[/TD]
[TD]
500​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
8
[/TD]
[TD]Client A[/TD]
[TD]Team A[/TD]
[TD]September[/TD]
[TD]
100​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
9
[/TD]
[TD]Client A[/TD]
[TD]Team B[/TD]
[TD]October[/TD]
[TD]
500​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
10
[/TD]
[TD]Client A[/TD]
[TD]Team A[/TD]
[TD]October[/TD]
[TD]
100​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
11
[/TD]
[TD]Client B[/TD]
[TD]Team B[/TD]
[TD]January[/TD]
[TD]
800​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
12
[/TD]
[TD]Client B[/TD]
[TD]Team A[/TD]
[TD]January[/TD]
[TD]
200​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
13
[/TD]
[TD]Client B[/TD]
[TD]Team B[/TD]
[TD]February[/TD]
[TD]
800​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
14
[/TD]
[TD]Client B[/TD]
[TD]Team A[/TD]
[TD]February[/TD]
[TD]
200​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
15
[/TD]
[TD]Client B[/TD]
[TD]Team B[/TD]
[TD]March[/TD]
[TD]
800​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
16
[/TD]
[TD]Client B[/TD]
[TD]Team A[/TD]
[TD]March[/TD]
[TD]
200​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

h2=IFERROR(AVERAGEIFS($D$2:$D$16,$A$2:$A$16,$G2,$C$2:$C$16,H$1),"") copy across and down
 
Upvote 0
perhaps you looking for something like this:


Excel 2013
ABCDEFG
1ClientTeamMonthRevenueAVG
2Client ATeam AJune500
3Client ATeam BJuly100ClientAVG
4Client ATeam AJuly500Client B1000
5Client ATeam BAugust500Client A580
6Client ATeam AAugust100
7Client ATeam BSeptember500
8Client ATeam ASeptember100
9Client ATeam BOctober500
10Client ATeam AOctober100
11Client BTeam BJanuary800
12Client BTeam AJanuary200
13Client BTeam BFebruary800
14Client BTeam AFebruary200
15Client BTeam BMarch800
16Client BTeam AMarch200
Sheet2
Cell Formulas
RangeFormula
G4{=AVERAGE(IFERROR(1/(1/SUMIFS($D$2:$D$16,$A$2:$A$16,$F4,$C$2:$C$16,{"Jan*";"Feb*";"Mar*";"Apr*";"May";"Jun*";"Jul*";"Aug*";"Sep*";"Oct*";"Nov*";"Dec*"})),FALSE))}
G5{=AVERAGE(IFERROR(1/(1/SUMIFS($D$2:$D$16,$A$2:$A$16,$F5,$C$2:$C$16,{"Jan*";"Feb*";"Mar*";"Apr*";"May";"Jun*";"Jul*";"Aug*";"Sep*";"Oct*";"Nov*";"Dec*"})),FALSE))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Last edited:
Upvote 0
VBA Geek, this could work. if there a way to replace the months in the formula a reference a 12 cell table with the months in it. the data being collected will all be formatted to use the same full month spelling.
 
Upvote 0
Iam getting an error with the formula. Does the {} around the months automatically be entered when i use control shift enter? i thought those indicators only showed up on the outside on the entire formula
 
Upvote 0
The error is a Divide by zero error. seem like it is not recognizing the months. to be clear the months are listed as mm/dd/yy format and then formatting to show the full month. For example, 6/1/17 shows as June. not sure if that is causing the issue
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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