by monthy avg calc if met criteria in diferent cell

rereis

New Member
Joined
Oct 9, 2006
Messages
35
.

Hello all I have the following xls:
------------A----------------B------------- C
1------- Date------- ----Ord#------- index
2------- 01/01/06-------W333-------7
3------- 01/03/06-------W332-------5
4------- 02/09/06-------W222------- 6
5-----------------------------------
6----------------------------
7----------- ---------------Jan-06-------Feb06
8------- Satisfied
9------- Dissatisfied

In row 8 I need to avg all index that are > than 6 for the month specified in row 7 and in row 9 all that are <=6.



Any suggestion?
Thanks
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Assuming B7 is the 1st of the relevant month formatted as "mmm-yy"

in B8

=AVERAGE(IF($C$2:$C$4>6,IF($A$2:$A$4-DAY($A$2:$A$4)+1=B$7,$C$2:$C$4)))

confirmed with CTRL+SHIFT+ENTER and copied across. Similar for row 9
 
Upvote 0
it trows a #Value error for the first IF. it appear that if doesn't like stuff like C2:C4>6
 
Upvote 0
See this illustration
Book3
ABCD
1DateOrd#
201/01/2006W3337
301/03/2006W3325
402/09/2006W2226
5
6
7Jan-06Feb-06
8Satisfied7#DIV/0!
9Dissatisfied56
10
Sheet1


Note: B7 and B8 are dates formatted as mmm-yy - must be 1st of month. Formulas need to be confirmed with CTRL+SHIFT+ENTER so that curly braces appear around the formula in the formula bar.
 
Upvote 0

Forum statistics

Threads
1,213,520
Messages
6,114,101
Members
448,548
Latest member
harryls

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