Dear Tony, Earlier you wanted the sum of largest 3 labels which are greater than Zero and your previous email also confirms the same, reproduced belowP- ** *"I have to find the sum only of the first 3 A that are greater than zero"*
Now as you have changed the requirement and need sum of 14 values, I have customized the solution and attached herewith. Best Regards, -- DILIP KUMAR PANDEY MBA-HR,B COM(Hons.),BCA Mobile: +91 9810929744 dilipan...@gmail.com dilipan...@yahoo.com New Delhi - 110062 On Mon, Nov 9, 2009 at 2:41 PM, Tony from Work <xerses...@gmail.com> wrote: > > First of all many thanks to Dilip and Deepak for the answers!!! > > Sadly they don't solve my problem, what I exactly need is one formula > that sum the value only of the first 14th values, and ignore any > further value. > > This is a sample of my worksheet: > > A B C > Time Keys Amount > 20-10-09 19:05 L 0.00 > 20-10-09 19:25 L 0.00 > 20-10-09 20:00 SH 0.08 > 21-10-09 01:15 L 0.00 > 21-10-09 01:20 L 0.00 > 21-10-09 02:00 L 0.00 > 21-10-09 03:35 SH 0.08 > 21-10-09 03:55 L 0.00 > 21-10-09 04:30 ST 0.00 > 21-10-09 08:00 L 0.00 > 21-10-09 08:25 SH 0.17 > > Now I've added after the Amount column a "counting column" with a > simple sumif ( =COUNTIF($B$2:B2,"SH") ) that gives me "rank" of each > SH. > > Then I've used a sumproduct ( =SUMPRODUCT((C2:C78>0)*(B2:B78="SH")* > (D2:D78<=14)*(C2:C78)) ) that: > > - Check if the value in C column is greater than 0 > - Check if the value in B column is equal to SH > - Check if the value in D Column is less or equal to 14 > > And if everything is true gives me the sum. > > I know that my solution even if works is a bit stupid, And I'm > puzzling myself if there is something that could work without adding a > colum in the worksheet > > Many thanks, > Antonio. > > > > --~--~---------~--~----~------------~-------~--~----~ ---------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 6,500 subscribers worldwide and receive many nice notes about the learning and support from the group. Our goal is to have 10,000 subscribers by the end of 2009. Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe -~----------~----~----~----~------~----~------~--~---
Conditional Sum by DILipandey-revised.xls
Description: MS-Excel spreadsheet