Try the below. Please note that this is an array formula. Within the cell in
edit mode (F2) paste this formula and press Ctrl+Shift+Enter to apply this
formula. If successful in 'Formula Bar' you can notice the curly braces at
both ends like "{=<formula>}"
=AVERAGE(IF(TEXT(B1:B100,"mm")="07",D1100))
If you want to ignore blanks and zeroes try the below version
=AVERAGE(IF(TEXT(B1:B100,"mm")="07",IF(D1100>0,D1100)))
For any particular mth/yr, you could capture it unambiguously, like this
In say, E2, array-entered (press CTRL+SHIFT+ENTER to confirm the formula):
=AVERAGE(IF(--(TEXT(B2:B10,"mmmyy")="Jul09"),D210))
Above presumes dates in col B are real dates
Adapt to suit the actual extents of your data
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.