Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Conditional sum, with 2 conditions

Conditional sum, with 2 conditions

Conditional sum, with 2 conditions

I have to sum a column data when, not just one condition is met, but 2.

In my case the year and the month of a date must equal to what I want.

Is that possible?

RE: Conditional sum, with 2 conditions


Try this formula


     A      B    C
1   Jan    2004  1
2   Feb    2004  2
3   Jan    2004  3
4   Apr    2004  4
5   May    2004  5

Answer will be 4

Hope this helps.

maybe only a drafter
but the best user at this company!

RE: Conditional sum, with 2 conditions

I found a good solution...

Since month never overtook 12 and day never overtook 31 it is enough strip all the date in a single number, like this:

13/06/2004 is the date (cell a1)
with the formula
20040613 easily usable for conditions :)

in my case I needed only the month so it'll become
for 200406

RE: Conditional sum, with 2 conditions

Or you can convert the date to a number (ie. 2 April 04 = 38022). Therefore you only need one condition.

RE: Conditional sum, with 2 conditions

Hi Melko,
Probably you already have a solution but i found a general solution for such problems in the website of j-walk, "Excel Developer tip". The formula we use for conditional summing is SUMIF. But for multiple criteria in different fields, the SUMIF function doesn't work. However, you can use an array formula. Remember, When you an array formula, press ctrl+Shift+Enter after you write it.

For example
Sum of Sales where Month="Jan" AND Region="North"



RE: Conditional sum, with 2 conditions

Array formulas? What is that?
Wow, I have to try...

RE: Conditional sum, with 2 conditions

An array is a group (a list or a table) of data such as  matrix. In EXCEL you can perform certain matrix calculations with array formula. Just see help for matrix calculations.

RE: Conditional sum, with 2 conditions


I think you have nailed it with your first solution above, but otherwise you can combine logical IF and AND functions, i.e.


for example.

RE: Conditional sum, with 2 conditions


I am afraid that is do not work that way.
I mean, if both condition are true I'll just have the sum of ALL data in the c6:c15 and not only the ones that respect the condition and if both condition are not meet I'll just hve nothing.

Am I wrong?

RE: Conditional sum, with 2 conditions

Oops, sorry Melko, my perception of the issue was obviously flawed.....I'll dig myself another hole.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close