Conditional Summing

  • Thread starter Thread starter MartinShort
  • Start date Start date
M

MartinShort

Hi there

Can anyone help with the following problem:

Example List
____________

23
45
62
12
8
30
7

I want to sum all of the numbers LESS THAN or EQUAL TO 45
Also to make things more difficult, I can't use filters and I don't
want to create a UDF in VBA. (The reason for the latter is that I am
convinced that this should be able to be done using a standard Excel
function!)

Any suggestions?

Thanks
Martin
 
Good morning Martin Short

This can be done using the old chestnut, =SUMIF().

Let's say that the example above occupies range A1 to A7. The formul
in, say, A( should be:

=SUMIF(A1:A7,"<=45",A1:A7)

giving a result of 125.

HTH

Dominic
 
dominicb said:
=SUMIF(A1:A7,"<=45",A1:A7)

You don't need the second array, SUMIF will default to that if not specified

=SUMIF(A1:A7,"<=45")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top