View Single Post
  #4   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

For averaging...

{=AVERAGE(IF((MOD(COLUMN(Q13:IM13)-COLUMN(Q13)+0,10)=0)*(Q13:IM130),Q13:IM13))}

For counting...

=SUMPRODUCT(--(MOD(COLUMN(Q13:IM13)-COLUMN(Q13)+0,10)=0),--(Q13:IM130),--ISNUMBER(Q13:IM13))

Renee - California wrote:
I need to count specific cells in a row. I had a similar formula to average
the same cells I am now trying to count:

=AVERAGE(IF((MOD(COLUMN(Q13:IM13),10)=7)*(Q13:IM13 0),Q13:IM13))

I tried tweaking this to count, but it's just not coming out with a valid
answer.

Any help would be appreciated.

Thanks!

Renee.


--

[1] The SumProduct function should implicitly coerce the truth values to
their Excel numeric equivalents.
[2] The lookup functions should have an optional argument for the return
value, defaulting to #N/A in its absence.