LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Need sum of top values in a range based on criteria

Lars-Ã…ke,

This formula is simple, versatile, and seems to return exactly what I am
looking for. Brilliant.

Thank you!
Chris

"Lars-Ã…ke Aspelin" wrote:

On Fri, 28 Aug 2009 12:02:01 -0700, CSchwass
wrote:

I need to sum the top ten values for 5 categories in a data range.

I can sort/filter by the category and use SUM and LARGE, but I want to show
the results in 5 cells (one per category) and automate the process. I am
willing to create a macro if a formula can't cover it.

My data looks like this:

Category,Value
A12,512
B35,458
A42,430
C20,429
E12,409
E29,395
D30,350
etc.

...in Columns A and B. How can I get results like this:

Category A,{Sum of top ten values for category A}
Category B,{Sum of top ten values for category B}
Category C,{Sum of top ten values for category C}
Category D,{Sum of top ten values for category D}
Category E,{Sum of top ten values for category E}

Thanks,
CSchwass



Try this formula in the cell where you want the sum of the top ten
values for category A:

=SUM(LARGE(IF(LEFT(A1:A1000)="A",B1:B1000),ROW(A1: A10)))

Note: This is an array formula. Confirm with CTRL+SHIFT+ENTER rather
than just ENTER.

Change the 1000 in both places to fit the size of your data in columns
A and B.

replace "A" with "B" to get the sum of the top ten values for category
B etc.

Hope this helps / Lars-Ã…ke





 
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
Cond. Format Data Bars of range based on values of another range alexmo Excel Worksheet Functions 4 January 16th 09 04:03 AM
Sum based on Range Criteria ddate Excel Worksheet Functions 2 August 3rd 07 10:16 PM
sum the values of a range based upon multiple ranges and criteria LiveIt... Excel Worksheet Functions 1 July 17th 06 09:23 PM
Find dates in a range; then sum values in that range by a criteria Anders Excel Discussion (Misc queries) 4 October 21st 05 03:41 PM
MIN within range based on criteria StevenL Excel Discussion (Misc queries) 9 July 11th 05 11:33 PM


All times are GMT +1. The time now is 05:16 PM.

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"