Posted to microsoft.public.excel.worksheet.functions
|
|
Return Numeric Labels that have different Numeric Values
Hi Biff,
Abbreviated, error trapped version much appreciated. Brilliant!
Counts: =COUNTIF($D$17:$D$76,$A$17:$A$76)
Sum1: =SUMIF($A$17:$A$76,$A$17:$A$76,$B$17:$B$76)
Sum2: =SUMIF($D$17:$D$76,$A$17:$A$76,$E$17:$E$76),$A$17: $A$76)
Labels: =$A$17:$A$76
Then:
=SMALL(IF(Counts,IF(Sum1<Sum2,Labels)),COLUMNS($ A:A))
With an error trap:
=IF(ISERROR(SMALL(IF(Counts,IF(Sum1<Sum2,Labels) ),COLUMNS($A:A))),"",SMALL(IF
(Counts,IF(Sum1<Sum2,Labels)),COLUMNS($A:A)))
Cheers,
Sam
T. Valko wrote:
Ooops!
Made a mistake in copying/pasting:
Sum2: =SUMIF($D$17:$D$76,$A$17:$A$76,$E$17:$E$76),$A$17: $A$76)
Should be:
Sum2: =SUMIF($D$17:$D$76,$A$17:$A$76,$E$17:$E$76)
Biff
You can clean that up and shorten it considerably (to where an error trap
could be added) if you use defined names:
[quoted text clipped - 40 lines]
Biff
--
Message posted via http://www.officekb.com
|