Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sum cells based on multiple conditions

Status
Not open for further replies.

dr772

Technical User
Nov 17, 2005
24
US
Spreadsheet
Date Unit Minutes
1/1/08 2M 40
2/5/08 4M 15
2/7 5M 10

I tried but is doesn't use the conditions I put in, it just gives me a total of 65.
FORMULA:
SUM(IF((Data!$A$2:$A$8000>VALUE("12/31/2007"))*(Data!$A$2:$A$8000<("2/1/2008")),Data!$C$2:$C$8000))

Please help

 
=SumProduct((Data!$A$2:$A$8000>VALUE("12/31/2007")) * (Data!$A$2:$A$8000<VALUE("2/1/2008")) * (Data!$C$2:$C$8000))

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 
thanks, I tried the sumproduct but I must have done somthing wrong....when i copied and pasted yours, it works...GREAT..
 
Sorry - got pulled away and pressed submit before writing any explanation.

You used "Sum[highlight]([/highlight]IF...". SumIf is a separate function. But it only accepts one condition.

For multiple conditions, you can use SumProduct, as I did above. I also added the "Value" around the second date condition.

Consider using two cells to store your start and end dates. That will make it easier to change the criteria.

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 
I didn't see your post before submitting my last.

Glad to help.

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top