LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 265
Default sum, ave with limits, help pls.

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)),MI N(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,COLUM N($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(I F(($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=I 2,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 ,
Chris 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))

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Value Limits in a Cell frankjh19701 Setting up and Configuration of Excel 3 March 3rd 11 11:20 PM
Sum with limits Chris Excel Discussion (Misc queries) 2 October 28th 08 05:00 PM
Nested IF Limits ronnomad Excel Discussion (Misc queries) 8 May 30th 07 03:43 PM
Row Limits jv Excel Worksheet Functions 1 March 17th 06 04:43 PM
Limits Student Excel Discussion (Misc queries) 1 December 7th 05 03:26 PM


All times are GMT +1. The time now is 12:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"