I had an average function in my spreadsheet that was working well: =AVERAGE(
IF('Sheet2'!$2:$2="Tuesday", IF('Sheet2'!7:7<>"",
'Sheet2'!7:7)))
Instead of using all of row 7 in the average calculation, I wanted to only work within a small range, so I changed the formula to this: =AVERAGE(
IF('Sheet2'!$2:$2="Tuesday", IF('Sheet2'!B7:Y7<>"",
'Sheet2'!B7:Y7)))
When I make this change, my formula returns a #n/a error. There are no #n/a’s in the range 'Sheet2'!B7:Y7.
What would be causing this error?
If you are using
Excel 2007or later versions then there is an inbuilt single functionAVERAGEIF. That might be easier for you, it doesn’t requiredCTRL+SHIFT+ENTERand there’s no need to check the range for blanks (AVERAGEIFignores those anyway) so you could use this formula=AVERAGEIF(Sheet2!$B2:$Y2,"Tuesday",Sheet2!$B7:$Y7)