ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sumif.... (https://www.excelbanter.com/excel-discussion-misc-queries/127756-sumif.html)

Bob Barnes

Sumif....
 
I'm an Access Programmer...

A co-worker asked why this doesn't work - it gives "0".

=SUMIF(C27:C38,"<01/04/2006 and 11/17/2005",D27:D38)

The...
"<01/04/2006 and 11/17/2005"...doesn't work

"<01/04/2006"...does work

TIA - Bob


Dave F

Sumif....
 
=SUMIF(AND(C27:C38<"1/4/2006",C27:C38"11/17/2005"),D27:D38)
--
Brevity is the soul of wit.


"Bob Barnes" wrote:

I'm an Access Programmer...

A co-worker asked why this doesn't work - it gives "0".

=SUMIF(C27:C38,"<01/04/2006 and 11/17/2005",D27:D38)

The...
"<01/04/2006 and 11/17/2005"...doesn't work

"<01/04/2006"...does work

TIA - Bob


Bob Phillips

Sumif....
 
You reckon?

=SUMPRODUCT(--(C27:C38<--"2006-01-04"),--(C27:C38--"2005-11-17"),D27:D38)

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Dave F" wrote in message
...
=SUMIF(AND(C27:C38<"1/4/2006",C27:C38"11/17/2005"),D27:D38)
--
Brevity is the soul of wit.


"Bob Barnes" wrote:

I'm an Access Programmer...

A co-worker asked why this doesn't work - it gives "0".

=SUMIF(C27:C38,"<01/04/2006 and 11/17/2005",D27:D38)

The...
"<01/04/2006 and 11/17/2005"...doesn't work

"<01/04/2006"...does work

TIA - Bob




Ron Coderre

Sumif....
 
Try one of these:

=SUMIF(C27:C38,"11/17/2005",D27:D38)-SUMIF(C27:C38,"=1/4/2006",D27:D38)

or...a bit shorter (and a bit less intuitive)
=SUM(SUMIF(C27:C38,{"11/17/2005","=1/4/2006"},D27:D38)*{1,-1})

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Bob Barnes" wrote:

I'm an Access Programmer...

A co-worker asked why this doesn't work - it gives "0".

=SUMIF(C27:C38,"<01/04/2006 and 11/17/2005",D27:D38)

The...
"<01/04/2006 and 11/17/2005"...doesn't work

"<01/04/2006"...does work

TIA - Bob


T. Valko

Sumif....
 
Try this:

=SUMIF(C27:C38,"2005/11/17",D27:D38)-SUMIF(C27:C38,"=2006/1/4",D27:D38)

Better to use cells to hold the date variables:

A27 = 11/17/2005
A28 = 1/4/2006

=SUMIF(C27:C38,""&A27,D27:D38)-SUMIF(C27:C38,"="&A28,D27:D38)

Biff

"Bob Barnes" wrote in message
...
I'm an Access Programmer...

A co-worker asked why this doesn't work - it gives "0".

=SUMIF(C27:C38,"<01/04/2006 and 11/17/2005",D27:D38)

The...
"<01/04/2006 and 11/17/2005"...doesn't work

"<01/04/2006"...does work

TIA - Bob




Bob Barnes

Sumif....
 
Thanks guys...

"Ron Coderre" wrote:

Try one of these:

=SUMIF(C27:C38,"11/17/2005",D27:D38)-SUMIF(C27:C38,"=1/4/2006",D27:D38)

or...a bit shorter (and a bit less intuitive)
=SUM(SUMIF(C27:C38,{"11/17/2005","=1/4/2006"},D27:D38)*{1,-1})

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Bob Barnes" wrote:

I'm an Access Programmer...

A co-worker asked why this doesn't work - it gives "0".

=SUMIF(C27:C38,"<01/04/2006 and 11/17/2005",D27:D38)

The...
"<01/04/2006 and 11/17/2005"...doesn't work

"<01/04/2006"...does work

TIA - Bob


Bob Barnes

Sumif....
 
Thanks guys...

"Dave F" wrote:

=SUMIF(AND(C27:C38<"1/4/2006",C27:C38"11/17/2005"),D27:D38)
--
Brevity is the soul of wit.


"Bob Barnes" wrote:

I'm an Access Programmer...

A co-worker asked why this doesn't work - it gives "0".

=SUMIF(C27:C38,"<01/04/2006 and 11/17/2005",D27:D38)

The...
"<01/04/2006 and 11/17/2005"...doesn't work

"<01/04/2006"...does work

TIA - Bob


Dave Peterson

Sumif....
 
It always scares me when I see dates used like this.

Maybe(!) I'm overly cautious, but I'd use:

=SUMIF(C27:C38,""&date(2005,11,17),D27:D38)
-SUMIF(C27:C38,"="&date(2006,1,4),D27:D38)



Ron Coderre wrote:

Try one of these:

=SUMIF(C27:C38,"11/17/2005",D27:D38)-SUMIF(C27:C38,"=1/4/2006",D27:D38)

or...a bit shorter (and a bit less intuitive)
=SUM(SUMIF(C27:C38,{"11/17/2005","=1/4/2006"},D27:D38)*{1,-1})

Does that help?
***********
Regards,
Ron

XL2002, WinXP

"Bob Barnes" wrote:

I'm an Access Programmer...

A co-worker asked why this doesn't work - it gives "0".

=SUMIF(C27:C38,"<01/04/2006 and 11/17/2005",D27:D38)

The...
"<01/04/2006 and 11/17/2005"...doesn't work

"<01/04/2006"...does work

TIA - Bob


--

Dave Peterson

Bob Barnes

Sumif....
 
Thanks guys

"Bob Phillips" wrote:

You reckon?

=SUMPRODUCT(--(C27:C38<--"2006-01-04"),--(C27:C38--"2005-11-17"),D27:D38)

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Dave F" wrote in message
...
=SUMIF(AND(C27:C38<"1/4/2006",C27:C38"11/17/2005"),D27:D38)
--
Brevity is the soul of wit.


"Bob Barnes" wrote:

I'm an Access Programmer...

A co-worker asked why this doesn't work - it gives "0".

=SUMIF(C27:C38,"<01/04/2006 and 11/17/2005",D27:D38)

The...
"<01/04/2006 and 11/17/2005"...doesn't work

"<01/04/2006"...does work

TIA - Bob





Ron Coderre

Sumif....
 
I agree....I keep *meaning* to use yyyy/mm/dd or even yyyy-mm-dd
but it keeps slipping my mind...
especially, when I'm editing a posted formula.

Feel free to keep reminding me, though.
It's bound to sink in eventually. <vbg
***********
Regards,
Ron

XL2002, WinXP


"Dave Peterson" wrote:

It always scares me when I see dates used like this.

Maybe(!) I'm overly cautious, but I'd use:

=SUMIF(C27:C38,""&date(2005,11,17),D27:D38)
-SUMIF(C27:C38,"="&date(2006,1,4),D27:D38)



Ron Coderre wrote:

Try one of these:

=SUMIF(C27:C38,"11/17/2005",D27:D38)-SUMIF(C27:C38,"=1/4/2006",D27:D38)

or...a bit shorter (and a bit less intuitive)
=SUM(SUMIF(C27:C38,{"11/17/2005","=1/4/2006"},D27:D38)*{1,-1})

Does that help?
***********
Regards,
Ron

XL2002, WinXP

"Bob Barnes" wrote:

I'm an Access Programmer...

A co-worker asked why this doesn't work - it gives "0".

=SUMIF(C27:C38,"<01/04/2006 and 11/17/2005",D27:D38)

The...
"<01/04/2006 and 11/17/2005"...doesn't work

"<01/04/2006"...does work

TIA - Bob


--

Dave Peterson


Bob Barnes

Sumif....
 
Another - thank you.

"T. Valko" wrote:

Try this:

=SUMIF(C27:C38,"2005/11/17",D27:D38)-SUMIF(C27:C38,"=2006/1/4",D27:D38)

Better to use cells to hold the date variables:

A27 = 11/17/2005
A28 = 1/4/2006

=SUMIF(C27:C38,""&A27,D27:D38)-SUMIF(C27:C38,"="&A28,D27:D38)

Biff

"Bob Barnes" wrote in message
...
I'm an Access Programmer...

A co-worker asked why this doesn't work - it gives "0".

=SUMIF(C27:C38,"<01/04/2006 and 11/17/2005",D27:D38)

The...
"<01/04/2006 and 11/17/2005"...doesn't work

"<01/04/2006"...does work

TIA - Bob





Bob Barnes

Sumif....
 
Thank you.

"Dave Peterson" wrote:

It always scares me when I see dates used like this.

Maybe(!) I'm overly cautious, but I'd use:

=SUMIF(C27:C38,""&date(2005,11,17),D27:D38)
-SUMIF(C27:C38,"="&date(2006,1,4),D27:D38)



Ron Coderre wrote:

Try one of these:

=SUMIF(C27:C38,"11/17/2005",D27:D38)-SUMIF(C27:C38,"=1/4/2006",D27:D38)

or...a bit shorter (and a bit less intuitive)
=SUM(SUMIF(C27:C38,{"11/17/2005","=1/4/2006"},D27:D38)*{1,-1})

Does that help?
***********
Regards,
Ron

XL2002, WinXP

"Bob Barnes" wrote:

I'm an Access Programmer...

A co-worker asked why this doesn't work - it gives "0".

=SUMIF(C27:C38,"<01/04/2006 and 11/17/2005",D27:D38)

The...
"<01/04/2006 and 11/17/2005"...doesn't work

"<01/04/2006"...does work

TIA - Bob


--

Dave Peterson


T. Valko

Sumif....
 
You're welcome!

Biff

"Bob Barnes" wrote in message
...
Another - thank you.

"T. Valko" wrote:

Try this:

=SUMIF(C27:C38,"2005/11/17",D27:D38)-SUMIF(C27:C38,"=2006/1/4",D27:D38)

Better to use cells to hold the date variables:

A27 = 11/17/2005
A28 = 1/4/2006

=SUMIF(C27:C38,""&A27,D27:D38)-SUMIF(C27:C38,"="&A28,D27:D38)

Biff

"Bob Barnes" wrote in message
...
I'm an Access Programmer...

A co-worker asked why this doesn't work - it gives "0".

=SUMIF(C27:C38,"<01/04/2006 and 11/17/2005",D27:D38)

The...
"<01/04/2006 and 11/17/2005"...doesn't work

"<01/04/2006"...does work

TIA - Bob








All times are GMT +1. The time now is 06:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com