Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sarah
 
Posts: n/a
Default Adding data in a list that meets a specific criteria

Hi
I have a long column of data in descending order. I want to add up all the
data that fits a specific criteria e.g. all data below 10, then all data
between 10 and 20 etc etc. I have to repeat this often and the data set
changes regularly so I need to use a function rather than set ranges. Any
ideas?? Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ufo_pilot
 
Posts: n/a
Default Adding data in a list that meets a specific criteria

=SUMIF(A1:A150,"<10")
=SUMIF(A1:A150,"=10")
You will need a row for each criteria.


"Sarah" wrote:

Hi
I have a long column of data in descending order. I want to add up all the
data that fits a specific criteria e.g. all data below 10, then all data
between 10 and 20 etc etc. I have to repeat this often and the data set
changes regularly so I need to use a function rather than set ranges. Any
ideas?? Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Martin
 
Posts: n/a
Default Adding data in a list that meets a specific criteria

Sumif is OK but won't work for more than one criteria as far as I know which
you need for greater than 10 and less than 20.

This is probably a case for a database function (haven't used these since
the days of Lotus 1-2-3 in the early 90s!). Your column will need a heading
- I've assumed that the word "Heading" has been typed above your figures.
DSUM needs a criteria range which is the heading(s) in a another cell with
the criteria below (AND works across, OR works down):

e.g. (criteria typed across top)

A B C
Heading Heading Heading
<10 =10 <20

for less than 10:

=DSUM([your range of data],1,A1:A2)
(1 is the column number in the range)

for 10 - 20:

=DSUM([your range of data],1,A1:C2)

etc.

Hope that makes sense but Help is good on Excel functions these days...


"Sarah" wrote:

Hi
I have a long column of data in descending order. I want to add up all the
data that fits a specific criteria e.g. all data below 10, then all data
between 10 and 20 etc etc. I have to repeat this often and the data set
changes regularly so I need to use a function rather than set ranges. Any
ideas?? Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
andy62
 
Posts: n/a
Default Adding data in a list that meets a specific criteria

What I do that seems to work and may be simpler is to have the first tally
sumif <10, then the second tally is simply sumif <20 minus all the previous
tallies, then the third tally is sumif <30 minus the sum of all the previous
tallies, etc. Here is is in excel lingo:

C1=SUMIF(A1:A5000,<10)
C2=SUMIF(A1:A5000,<20)-SUM($C$1:C1)
copy this second formula down to as many cuts as you need, then replace the
"<20"s with the remaining cutoffs. But you need to arrange the cutoffs in
increasing order for this to work.

HTH

"Martin" wrote:

Sumif is OK but won't work for more than one criteria as far as I know which
you need for greater than 10 and less than 20.

This is probably a case for a database function (haven't used these since
the days of Lotus 1-2-3 in the early 90s!). Your column will need a heading
- I've assumed that the word "Heading" has been typed above your figures.
DSUM needs a criteria range which is the heading(s) in a another cell with
the criteria below (AND works across, OR works down):

e.g. (criteria typed across top)

A B C
Heading Heading Heading
<10 =10 <20

for less than 10:

=DSUM([your range of data],1,A1:A2)
(1 is the column number in the range)

for 10 - 20:

=DSUM([your range of data],1,A1:C2)

etc.

Hope that makes sense but Help is good on Excel functions these days...


"Sarah" wrote:

Hi
I have a long column of data in descending order. I want to add up all the
data that fits a specific criteria e.g. all data below 10, then all data
between 10 and 20 etc etc. I have to repeat this often and the data set
changes regularly so I need to use a function rather than set ranges. Any
ideas?? Thanks!

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sarah
 
Posts: n/a
Default Adding data in a list that meets a specific criteria

All excellent points - thank you VERY much!

"andy62" wrote:

What I do that seems to work and may be simpler is to have the first tally
sumif <10, then the second tally is simply sumif <20 minus all the previous
tallies, then the third tally is sumif <30 minus the sum of all the previous
tallies, etc. Here is is in excel lingo:

C1=SUMIF(A1:A5000,<10)
C2=SUMIF(A1:A5000,<20)-SUM($C$1:C1)
copy this second formula down to as many cuts as you need, then replace the
"<20"s with the remaining cutoffs. But you need to arrange the cutoffs in
increasing order for this to work.

HTH

"Martin" wrote:

Sumif is OK but won't work for more than one criteria as far as I know which
you need for greater than 10 and less than 20.

This is probably a case for a database function (haven't used these since
the days of Lotus 1-2-3 in the early 90s!). Your column will need a heading
- I've assumed that the word "Heading" has been typed above your figures.
DSUM needs a criteria range which is the heading(s) in a another cell with
the criteria below (AND works across, OR works down):

e.g. (criteria typed across top)

A B C
Heading Heading Heading
<10 =10 <20

for less than 10:

=DSUM([your range of data],1,A1:A2)
(1 is the column number in the range)

for 10 - 20:

=DSUM([your range of data],1,A1:C2)

etc.

Hope that makes sense but Help is good on Excel functions these days...


"Sarah" wrote:

Hi
I have a long column of data in descending order. I want to add up all the
data that fits a specific criteria e.g. all data below 10, then all data
between 10 and 20 etc etc. I have to repeat this often and the data set
changes regularly so I need to use a function rather than set ranges. Any
ideas?? Thanks!

Reply
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
Adding up data in multiple cells for a single criteria. Philip Excel Worksheet Functions 1 April 5th 06 11:30 AM
Averaging data that meets a criteria Intuit Excel Worksheet Functions 4 February 22nd 06 01:02 PM
Retrieving a Value from List that meets multiple Criteria mamalik Excel Discussion (Misc queries) 3 January 2nd 06 02:28 PM
Excel Macro to Copy & Paste [email protected] Excel Worksheet Functions 0 December 1st 05 01:56 PM
data validation list should have opt. to select based on criteria be Excel Worksheet Functions 1 September 15th 05 01:05 PM


All times are GMT +1. The time now is 03:38 PM.

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

About Us

"It's about Microsoft Excel"