Actuarial Outpost
 
Go Back   Actuarial Outpost > Actuarial Discussion Forum > Software & Technology
FlashChat Actuarial Discussion Preliminary Exams CAS/SOA Exams Cyberchat Around the World Suggestions

Meet the Employees of D.W. Simpson & Co.
Lindsey Nelson, Becki Tobia, Angie Wachholz, Diane Vanik, Katherine Hays
Alex Babic, Paul Castro, Steve Davis, Claude Penland, Lesley Traverso, Tom Troceen
Aaron Benton, K.C. Cho, Sally Ezra, Patty Jacobsen, Dave Simpson, Bob Morand, Dave Retford
Maureen Matous, R. Hicks, Marianne Westphal, Kim Skora, Kristyn Sakelaris, Ellen Hoppenjan
James Gardner, Lorraine Cully, Sarah Cleveland, Bethany Rave, Amy Trapp, David Benton
Dan Karrow, Ginger Hassler, Rhonda Glick, Bryan Duffy, Derek Mulder, Barclay Burns
Chris Hicks, Valorie Etheridge, Sean Loboda, Danny Pudi, Tom Munar, Julie Garwood
Carol Datu, Barb Rave, James Lecoutre, Margit Vogele, Jennifer Retford


Reply
 
Thread Tools Display Modes
  #1  
Old 12-28-2006, 02:56 PM
Expunge Expunge is offline
Member
 
Join Date: Jul 2003
Posts: 8,616
Default Excel Formula Curiosity

I just used the formula =SUM(LARGE(C4:C16,{1,2}))

just curious if i wanted to sum more than the top 2 values if there is a much better way of doing this. say the top 1000 values. Potential ties exist at the cutoff point exist.
__________________
John 3:16
Reply With Quote
  #2  
Old 12-28-2006, 03:25 PM
NoName's Avatar
NoName NoName is offline
Site Supporter
Site Supporter
 
Join Date: Nov 2001
Posts: 4,333
Default

Making no claim that this is the most efficient way...

=SUMIF($D$17:$D$1141,">"&LARGE($D$17:$D$1141,1000) ,$D$17:$D$1141)+LARGE($D$17:$D$1141,1000)*(1000-COUNTIF($D$17:$D$1141,">"&LARGE($D$17:$D$1141,1000 )))
__________________
It's not that easy, Marcy. First you have to get money orders under an assumed name to pay the rent ... then, where do you keep the extra key? ... and just try getting phone service turned on using an alias these days ... not that I've given it much thought.


We have to return to some very common-sense principles that everyday Americans live by every time they go to the grocery store or want to go to the movies or cash their paycheck, and that is you can't spend more than you have. -- Robert Gibbs

מַרְבֶּה נְכָסִים מַרְבֶּה דְאָגָה
Reply With Quote
  #3  
Old 12-28-2006, 03:48 PM
Expunge Expunge is offline
Member
 
Join Date: Jul 2003
Posts: 8,616
Default

ah found something similar to mine....

entered as an array formula (ctrl shift enter)

=sum(large(a1:a10000,row(indirect("1:1000"))))
__________________
John 3:16
Reply With Quote
  #4  
Old 12-28-2006, 04:10 PM
KRWarner KRWarner is offline
Member
 
Join Date: Oct 2005
Posts: 76
Default

I have seen some creative use of sumproduct in here. Here's another way to go about it getting the result.

=SUM(A1:A10000)-SUMPRODUCT(A1:A10000,--(A1:A10000<LARGE(A1:A10000,1000)))

I take it you want to add everything greater and everything equal to the 1000 Largest. I summed everything and subtracted everything smaller.
__________________
I'm not an actuary, but I play one on TV.
Reply With Quote
  #5  
Old 12-28-2006, 04:17 PM
KRWarner KRWarner is offline
Member
 
Join Date: Oct 2005
Posts: 76
Default

Quote:
Originally Posted by KRWarner View Post
I have seen some creative use of sumproduct in here. Here's another way to go about it getting the result.

=SUM(A1:A10000)-SUMPRODUCT(A1:A10000,--(A1:A10000<LARGE(A1:A10000,1000)))

I take it you want to add everything greater and everything equal to the 1000 Largest. I summed everything and subtracted everything smaller.
Stupid me.

=SUMPRODUCT(A1:A10000,--(A1:A10000>=LARGE(A1:A10000,1000)))

Just use the Greater than or equal to, I guess I was over thinking it.
__________________
I'm not an actuary, but I play one on TV.
Reply With Quote
  #6  
Old 12-28-2006, 04:21 PM
Expunge Expunge is offline
Member
 
Join Date: Jul 2003
Posts: 8,616
Default

Quote:
Originally Posted by KRWarner View Post
I take it you want to add everything greater and everything equal to the 1000 Largest. I summed everything and subtracted everything smaller.
Not really i'm looking to add up 1000 numbers, if the is a 5 way tie at the 1000th number and i have already added 998 numbers i want 2 of the 5 tie.
__________________
John 3:16
Reply With Quote
  #7  
Old 12-30-2006, 12:35 AM
Old Actuary Old Actuary is offline
Member
 
Join Date: Sep 2001
Posts: 197
Default

Here's my solution:

=SUMIF($A$1.$A$10000, ">"&N(LARGE($A$1.$A$10000,1000)))
+(1000-COUNTIF($A$1.$A$10000, ">"&N(LARGE($A$1.$A$10000,1000))))
*LARGE($A$1.$A$10000,1000)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT -4. The time now is 02:11 PM.


Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Page generated in 0.43597 seconds with 6 queries