Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Lius
 
Posts: n/a
Default how to sum using dates as a criteria

How do I add up a range of cells using dates as a criteria?
  #2   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
for example
=SUMIF(A1:A100,"=" & DATE(2004,10,1),B1:B100)

"Lius" wrote:

How do I add up a range of cells using dates as a criteria?

  #3   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way:

Assume your data are in columns A (Dates) and B (Values), and that your
criteria dates are in D1 and D2 (inclusive):

=SUMIF(A:A,"=" & D1, B:B) - SUMIF(A:A, "" & D2, B:B)

or

=SUMPRODUCT(--(A1:A1000=D1),--(A1:A1000<=D2),B1:B1000)

(See

http://www.mcgimpsey.com/excel/doubleneg.html

for an explanation of the "--").


In article ,
"Lius" wrote:

How do I add up a range of cells using dates as a criteria?

  #4   Report Post  
D@annyBoy
 
Posts: n/a
Default

thanks it works

but can I use a range of dates instead

sum all cells if month is Jan
will this work =SUMIF(A1:A100,"=" & DATE(1,1,2004),"<="&
DATE1,2,2004,B1:B100)


"Frank Kabel" wrote in message
...
Hi
for example
=SUMIF(A1:A100,"=" & DATE(2004,10,1),B1:B100)

"Lius" wrote:

How do I add up a range of cells using dates as a criteria?



  #5   Report Post  
D@annyBoy
 
Posts: n/a
Default

I have 2 columns of data
Under A is the dates
Under G is the values

I am trying to add up all the values if the month is Jan
"=" & DATE(1,1,2004), "<=" & DATE(31,1,2004),




"JE McGimpsey" wrote in message
...
One way:

Assume your data are in columns A (Dates) and B (Values), and that your
criteria dates are in D1 and D2 (inclusive):

=SUMIF(A:A,"=" & D1, B:B) - SUMIF(A:A, "" & D2, B:B)

or

=SUMPRODUCT(--(A1:A1000=D1),--(A1:A1000<=D2),B1:B1000)

(See

http://www.mcgimpsey.com/excel/doubleneg.html

for an explanation of the "--").


In article ,
"Lius" wrote:

How do I add up a range of cells using dates as a criteria?





  #6   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
try:
=SUMIF(A1:A100,"=" & DATE(2004,1,1))-SUMIF(A1:A100,"=" & DATE(2004,2,1))


"D@annyBoy" wrote:

thanks it works

but can I use a range of dates instead

sum all cells if month is Jan
will this work =SUMIF(A1:A100,"=" & DATE(1,1,2004),"<="&
DATE1,2,2004,B1:B100)


"Frank Kabel" wrote in message
...
Hi
for example
=SUMIF(A1:A100,"=" & DATE(2004,10,1),B1:B100)

"Lius" wrote:

How do I add up a range of cells using dates as a criteria?




  #7   Report Post  
D@annyBoy
 
Posts: n/a
Default

no go

This is my data value

DATE LC NO LC AMOUNT
01-01-04 USD1,000.00
15-01-04 USD1,000.00
02-02-04 USD1,000.00


Try to create another sheet as follows;

CUSTOMER JAN FEB MAR
C.B.N. ONE OF THE BOYS 2,000.00 1,000.00


This is how is looks at the moment :-(

CUSTOMER JAN FEB MAR
C.B.N. ONE OF THE BOYS 3,000.00


Is this possible

"Frank Kabel" wrote in message
...
Hi
try:
=SUMIF(A1:A100,"=" & DATE(2004,1,1))-SUMIF(A1:A100,"=" & DATE(2004,2,1))


"D@annyBoy" wrote:

thanks it works

but can I use a range of dates instead

sum all cells if month is Jan
will this work =SUMIF(A1:A100,"=" & DATE(1,1,2004),"<="&
DATE1,2,2004,B1:B100)


"Frank Kabel" wrote in message
...
Hi
for example
=SUMIF(A1:A100,"=" & DATE(2004,10,1),B1:B100)

"Lius" wrote:

How do I add up a range of cells using dates as a criteria?






  #8   Report Post  
D@annyBoy
 
Posts: n/a
Default

this is the formulae that I am using

=SUMIF(CBN!$A:$A,"=" & DATE(1,1,2004),CBN!$F:$F)
but it includes dates before 2003 as well

can you help newbie incorporate your suggest

I tried this, but it doesn't works

=SUMIF(CBN!$A:$A,"=" & DATE(2004,1,1)-SUMIF(CBN!$A:$A,"<=" &
DATE(2004,2,1)),CBN!$F:$F)



"Frank Kabel" wrote in message
...
Hi
try:
=SUMIF(A1:A100,"=" & DATE(2004,1,1))-SUMIF(A1:A100,"=" & DATE(2004,2,1))


"D@annyBoy" wrote:

thanks it works

but can I use a range of dates instead

sum all cells if month is Jan
will this work =SUMIF(A1:A100,"=" & DATE(1,1,2004),"<="&
DATE1,2,2004,B1:B100)


"Frank Kabel" wrote in message
...
Hi
for example
=SUMIF(A1:A100,"=" & DATE(2004,10,1),B1:B100)

"Lius" wrote:

How do I add up a range of cells using dates as a criteria?






  #9   Report Post  
D@annyBoy
 
Posts: n/a
Default

thanks

I finally figure it out
For Jan I use
=SUMIF(CBN!$A:$A,"=" & DATE(2004,1,1),CBN!$F:$F)-SUMIF(CBN!$A:$A,"=" &
DATE(2004,1,31),CBN!$F:$F)
For Feb I use
=SUMIF(CBN!$A:$A,"=" & DATE(2004,2,1),CBN!$F:$F)-SUMIF(CBN!$A:$A,"=" &
DATE(2004,2,31),CBN!$F:$F)

"Frank Kabel" wrote in message
...
Hi
try:
=SUMIF(A1:A100,"=" & DATE(2004,1,1))-SUMIF(A1:A100,"=" & DATE(2004,2,1))


"D@annyBoy" wrote:

thanks it works

but can I use a range of dates instead

sum all cells if month is Jan
will this work =SUMIF(A1:A100,"=" & DATE(1,1,2004),"<="&
DATE1,2,2004,B1:B100)


"Frank Kabel" wrote in message
...
Hi
for example
=SUMIF(A1:A100,"=" & DATE(2004,10,1),B1:B100)

"Lius" wrote:

How do I add up a range of cells using dates as a criteria?






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
Formating Dates for production schedule dpl7579 Excel Discussion (Misc queries) 1 January 11th 05 08:43 PM
due dates Niki New Users to Excel 4 January 10th 05 04:11 PM
Entering dates in Excel 2002 DickG Excel Discussion (Misc queries) 3 January 9th 05 02:56 PM
I get wrong dates when i paste from a different sheet into a new s mmollat Excel Discussion (Misc queries) 2 January 6th 05 07:35 PM
Filtering with dates T Excel Discussion (Misc queries) 1 December 29th 04 07:01 PM


All times are GMT +1. The time now is 06:09 PM.

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"