Hi! I've been perusing a spreadsheet in Excel 2003 I've been working on with lots of array formulas to calculate averages based on two criteria. I thought my formulas were working until I discovered my averages seemed abnormally low. I checked this using a filter on the data and confirmed it.
I have several cases where there is no data to average for a cell, but the cell is counted since it meets the two if criteria. I believe the array is then counting this as a zero and averaging accordingly.
Is there an easy way to write the array formula to ignore the blank cells?
Here, for example, is what I am doing now:
=AVERAGE(IF(SUMMARY!$AF$2:SUMMARY!$AF$300=$A3,IF(SUMMARY!$BK$2:SUMMARY!$BK$300=$A$2,SUMMARY!BG$2:SUMMARY!BG$300)))
I want the cell to go to the Summary tab, check column AF and BK and then if the two criteria are met, average the data in cell BG. However, there are one or two rows in BG that are blank in some cases. How do I write the formula to exclude those cells?
Thanks for your help. I can attach a spreadsheet if necessary.
Bookmarks