Another Average non-adjacent cells question...

J

jamartinez

I have two non-adjacent cells that I want to average but throw out one
of the numbers if one of them is zero...I used this and it works fine
with adjacent cells but stumped on getting it to work with two
non-adjacent cells. My cells are F3 and K3.

=AVERAGE(IF(B2:C2<>0,B2:C2," "))
CTRL+SHIFT+ENTER

Thanks for any help I get on this...
 
B

Biff

Hi!

One way:

=IF(COUNT(F3,K3)<1,"",SUM(F3,K3)/SUMPRODUCT(--(MOD(COLUMN(F3:K3),5)=1),--(F3:K3>0)))

Biff
 

Ask a Question

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.

Ask a Question

Top