#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 134
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,726
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,118
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default 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





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 134
Default 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

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 134
Default 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

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default 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
  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 134
Default 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




  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,118
Default 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



  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 134
Default 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




  #12   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 134
Default 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

  #13   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default 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






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use SUMIF to return sums between two values located in cells ScottBerger Excel Worksheet Functions 2 April 23rd 23 09:05 PM
How to use SUMIF function with non-adjacent cells KLaw Excel Worksheet Functions 5 October 19th 06 10:15 AM
Help with SUMIF function PO Excel Worksheet Functions 6 June 1st 06 09:07 AM
Sumif of Sumif perhaps? Fred Excel Discussion (Misc queries) 2 March 29th 06 05:39 PM
SUMIF Ferg Excel Worksheet Functions 3 February 28th 06 03:37 AM


All times are GMT +1. The time now is 09:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"