SUM if the conditions are met

M

Mortir

I have the following case

A B C
1 Date Value Mark
2 23.10.2007 100 X
3 23.10.2007 150
4 23.10.2007 200
5 23.10.2007 300 X
6 24.10.2007 123
7 24.10.2007 344
etc...

Now I would like to have a formula which would sum the values on a
certain date, that are marked with an X. For example, the result on
23.10.2007 would sum only 100+300=400
 
G

Guest

In D2:
=SUMPRODUCT((A2:A10=--"23 Oct 2007")*(C2:C10="X"),B2:B10)
Adapt the ranges & criteria to suit
 
M

Max

In D2:
How would that work when his data uses "10" for October?

It'll work fine as long as the dates in col A are real dates (presumed). The
double minus in: --"23 Oct 2007" converts the text string to a real,
specific date, as per OP's specs.

---
 
B

Bernard Liengme

Do an experiment.

In A1 enter the date 1/2/2007 (or 2/1/2007 if you use US date format)
In B1 enter =A1=--("1 feb 2007")
The result is TRUE

But
A1 enter the date 1/2/2007 (or 2/1/2007 if you use US date format)
In B1 enter =A1=--("1 2 2007") {or A1=--("2 1 2007") in USA}
The result is #VALUE!

But adding acceptably date separator characters, as in
=A1=--("1/2/2007") or =A1=--("1-2-2007")
you again get TRUE
best wishes
 

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

Top