Re: sum, ave with limits, help pls.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Try...

=LOOKUP(REPT("z",255),CHOOSE({1,2},"",SUM(IF(($C$1:$G$1=I2)*(COLUMN($C$1:
$G$1)<=SMALL(IF($C$1:$G$1=I2,COLUMN($C$1:$G$1)),MIN(2,COUNTIF($C$1:$G$1,I
2)))),$C$5:$G$5))/SUM(SUMIF($A$2:$A$4,IF(ISNUMBER($C$2:$G$4)*($C$1:$G$1=I
2)*(COLUMN($C$1:$G$1)<=SMALL(IF($C$1:$G$1=I2,COLUMN($C$1:$G$1)),MIN(2,COU
NTIF($C$1:$G$1,I2)))),$A$2:$A$4),$B$2:$B$4))&""))

....confirmed with CONTROL+SHIFT+ENTER. Note that while the formula
returns a number when data is present the number is formatted as text.
Here's an alternative which returns a numerical value...

=LOOKUP(9.99999999999999E+307,CHOOSE({1,2},0,SUM(IF(($C$1:$G$1=I2)*(COLUM
N($C$1:$G$1)<=SMALL(IF($C$1:$G$1=I2,COLUMN($C$1:$G$1)),MIN(2,COUNTIF($C$1
:$G$1,I2)))),$C$5:$G$5))/SUM(SUMIF($A$2:$A$4,IF(ISNUMBER($C$2:$G$4)*($C$1
:$G$1=I2)*(COLUMN($C$1:$G$1)<=SMALL(IF($C$1:$G$1=I2,COLUMN($C$1:$G$1)),MI
N(2,COUNTIF($C$1:$G$1,I2)))),$A$2:$A$4),$B$2:$B$4))))

....confirmed with CONTROL+SHIFT+ENTER. Note, however, the formula
returns 0 even when data is not present.

Hope this helps!

In article <C527CF3E-44FD-4FC6-806F-D8A1CDC94505@xxxxxxxxxxxxx>,
Chris <Chris@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Hi,

I have one more question, Like I said, I combined the formulas so that it
would average the data but if there is no data, it shows as #DIV/0!. I need
this to show as blank or empty

this is BTW the formula that I used. I tried adding another If condition
with "" as an option but it wont work, pls help. Tnx again.

=SUM(IF(DIO!$D$3:$FG$3=A10,IF(COLUMN(DIO!$D$3:$FG$3)<=SMALL(IF(DIO!$D$3:$FG$3=
A10,COLUMN(DIO!$D$3:$FG$3)),MIN(8,COUNTIF(DIO!$D$3:$FG$3,A10))),DIO!$D$8:$FG$8
)))/SUM(SUMIF(DIO!$B$4:$B$7,IF(ISNUMBER(DIO!$D$4:$FG$7),IF(DIO!$D$3:$FG$3=A10,
IF(COLUMN(DIO!$D$3:$FG$3)<=SMALL(IF(DIO!$D$3:$FG$3=A10,COLUMN(DIO!$D$3:$FG$3))
,MIN(8,COUNTIF(DIO!$D$3:$FG$3,A10))),DIO!$B$4:$B$7))),DIO!$C$4:$C$7))
.



Relevant Pages

  • Re: Want to Remove Empty Applications Folder from Gnome Menu
    ... > I've upgraded my glabels application (label making software that works ... btw) on my FC2 machine. ... There seem to be some empty menu ...
    (Fedora)
  • Re: Gforth f?r das Elektor-R8C-Board
    ... Mit Empty konnte ich das System wieder herstellen und alles ... habe trat der Fehler bis jetzt auch noch nicht wieder auf. ... BTW: ...
    (de.comp.lang.forth)
  • Directory wont delete
    ... Yet the directory is empty. ... BTW, I need to be able to delete this directory for the "ldapclient ...
    (SunManagers)
  • Re: power button not workin?
    ... > Btw I found various MSDN article describing minlogon AND the use of the ...
    (microsoft.public.windowsxp.embedded)
  • Re: BOMS
    ... charter member of the BOMS club. ... Tnx. ... Btw I think I sounded a bit like Alaska Rocks in my previous post, ...
    (rec.sport.tennis)