Hi all,
I have the following formula:
=SUMPRODUCT(($B4:$R4)*(1/$B3:$R3)*($B$1:$R$1=$B$8))/COUNTIFS($B$1:$R$1,$B$8)
..where:
- Row 1 is a date range, and I only want cells from rows 3 and 4 to be included if a date condition is met
- Rows 3 and 4 are data, with row 4 being divided by row 3 when that date condition is met
- Cell B8 is where I input the date condition value
- Finally, the COUNTIFS at the end produces an average
However, my data rows 3 and 4 will sometimes contain #N/A values. I need things that way as I'm producing graphs from the data too and don't want the data points to show up there. The problem is that these cells also stop the formula from working on cells where data is present.
The first tab shows this working. The second shows it when it doesn't.
Can you help me add a condition where it will only count cells greater than zero? If a column in row 3 has an #N/A then so should the column in row 4, meaning that the error checking should only be needed once.
Thanks in advance as always for your expertise!
SUMPRODUCT Question.xlsx
Bookmarks