سؤال

I need a formula to find average for values if column value in 1:1 matches 15 and row value in A:A matches 750 for example,

here is a screen shot for the table

http://s17.postimg.org/twjqzdj5r/Untitled.jpg

هل كانت مفيدة؟

المحلول

Using simoco's setup you could also use an "array formula" with AVERAGE function, i.e.

=AVERAGE(IF((A3:A17=750)*(C1:M1=15),C3:M17))

confirmed with CTRL+SHIFT+ENTER

نصائح أخرى

Try this one:

=SUMPRODUCT(C3:M17*(A3:A17=750)*(C1:M1=15))/SUMPRODUCT((C3:M17<>"")*(A3:A17=750)*(C1:M1=15))

where

  • A3:A17 address of values in your column A:A
  • C1:M1 address of values in row №1
  • C3:M17 entire target range

First part SUMPRODUCT(C3:M17*(A3:A17=750)*(C1:M1=15)) gives you sum of all values from range C3:M17 where corresponding value in column A equals to 750 and corresponding value in row №1 equals to 15.

Second part SUMPRODUCT((C3:M17<>"")*(A3:A17=750)*(C1:M1=15)) gives you count of all non empty cells in target range C3:M17 where corresponding value in column A equals to 750 and corresponding value in row №1 equals to 15.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top