Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 46
Default calculating between 2 given dates

Hello

I would like to learn how to calculate amonts in a sumif that are between 2
dates.

eg =SUMIF('Costs detail'!$Q$2:$Q518,A8,'Costs detail'!$O$2:$O$542)
......where A8 is currently just a month reference (I mean it looks at cell A8
where I type in the month). So in other words, I'd like it to look up values
in another worksheet called Costs Detail, providing the associated dates are
between, say 1st Feb and end of April. Any help always please.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default calculating between 2 given dates

One way...

A8 = start date = 2/1/2008
A9 = end date = 4/30/2008

=SUMIF('Costs detail'!$Q$2:$Q518,"="&A8,'Costs
detail'!$O$2:$O$518)-=SUMIF('Costs detail'!$Q$2:$Q518,""&A9,'Costs
detail'!$O$2:$O$518)

Note that in your posted formula you have different sized ranges:

$Q$2:$Q518
$O$2:$O$542



--
Biff
Microsoft Excel MVP


"spudsnruf" wrote in message
...
Hello

I would like to learn how to calculate amonts in a sumif that are between
2
dates.

eg =SUMIF('Costs detail'!$Q$2:$Q518,A8,'Costs detail'!$O$2:$O$542)
.....where A8 is currently just a month reference (I mean it looks at cell
A8
where I type in the month). So in other words, I'd like it to look up
values
in another worksheet called Costs Detail, providing the associated dates
are
between, say 1st Feb and end of April. Any help always please.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default calculating between 2 given dates

I assume the equal sign here is an oversight...

)-=SUMIF(
--
HTH...

Jim Thomlinson


"T. Valko" wrote:

One way...

A8 = start date = 2/1/2008
A9 = end date = 4/30/2008

=SUMIF('Costs detail'!$Q$2:$Q518,"="&A8,'Costs
detail'!$O$2:$O$518)-=SUMIF('Costs detail'!$Q$2:$Q518,""&A9,'Costs
detail'!$O$2:$O$518)

Note that in your posted formula you have different sized ranges:

$Q$2:$Q518
$O$2:$O$542



--
Biff
Microsoft Excel MVP


"spudsnruf" wrote in message
...
Hello

I would like to learn how to calculate amonts in a sumif that are between
2
dates.

eg =SUMIF('Costs detail'!$Q$2:$Q518,A8,'Costs detail'!$O$2:$O$542)
.....where A8 is currently just a month reference (I mean it looks at cell
A8
where I type in the month). So in other words, I'd like it to look up
values
in another worksheet called Costs Detail, providing the associated dates
are
between, say 1st Feb and end of April. Any help always please.




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default calculating between 2 given dates

Correction:

=SUMIF('Costs detail'!$Q$2:$Q518,"="&A8,'Costs
detail'!$O$2:$O$518)-SUMIF('Costs detail'!$Q$2:$Q518,""&A9,'Costs
detail'!$O$2:$O$518)

Removed the equal sign before the 2nd SUMIF.

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
One way...

A8 = start date = 2/1/2008
A9 = end date = 4/30/2008

=SUMIF('Costs detail'!$Q$2:$Q518,"="&A8,'Costs
detail'!$O$2:$O$518)-=SUMIF('Costs detail'!$Q$2:$Q518,""&A9,'Costs
detail'!$O$2:$O$518)

Note that in your posted formula you have different sized ranges:

$Q$2:$Q518
$O$2:$O$542



--
Biff
Microsoft Excel MVP


"spudsnruf" wrote in message
...
Hello

I would like to learn how to calculate amonts in a sumif that are between
2
dates.

eg =SUMIF('Costs detail'!$Q$2:$Q518,A8,'Costs detail'!$O$2:$O$542)
.....where A8 is currently just a month reference (I mean it looks at
cell A8
where I type in the month). So in other words, I'd like it to look up
values
in another worksheet called Costs Detail, providing the associated dates
are
between, say 1st Feb and end of April. Any help always please.





  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 46
Default calculating between 2 given dates

Thanks Very much (and noted the comment about different sized ranges). Is
there actually a way of doing the dates within the formula something like
this..

SUMIF('Costs detail'!$Q$2:$Q518,Date1,2,2008,Date<30,4,2008,'C osts
detail'!$O$2:$O$542)...ie so that within the formula I list the date before
and after that I want to apply?

Thanks


"T. Valko" wrote:

One way...

A8 = start date = 2/1/2008
A9 = end date = 4/30/2008

=SUMIF('Costs detail'!$Q$2:$Q518,"="&A8,'Costs
detail'!$O$2:$O$518)-=SUMIF('Costs detail'!$Q$2:$Q518,""&A9,'Costs
detail'!$O$2:$O$518)

Note that in your posted formula you have different sized ranges:

$Q$2:$Q518
$O$2:$O$542



--
Biff
Microsoft Excel MVP


"spudsnruf" wrote in message
...
Hello

I would like to learn how to calculate amonts in a sumif that are between
2
dates.

eg =SUMIF('Costs detail'!$Q$2:$Q518,A8,'Costs detail'!$O$2:$O$542)
.....where A8 is currently just a month reference (I mean it looks at cell
A8
where I type in the month). So in other words, I'd like it to look up
values
in another worksheet called Costs Detail, providing the associated dates
are
between, say 1st Feb and end of April. Any help always please.






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default calculating between 2 given dates

calculate amonts in a sumif that are between 2 dates.

In 99 out of 100 cases when someone says "between 2 dates" what they really
mean is greater than or equal to a start date and less than or equal to an
end date.

SUMIF('Costs detail'!$Q$2:$Q518,Date1,2,2008,Date<30,4,2008,'C osts
detail'!$O$2:$O$542)...


The logic of the above would *exclude* the following dates (m/d/y format):

2/1/2008
4/30/2008


Try one of these:

=SUMIF('Costs detail'!$Q$2:$Q518,"="&DATE(2008,2,1),'Costs
detail'!$O$2:$O$518)-SUMIF('Costs
detail'!$Q$2:$Q518,""&DATE(2008,4,30),'Costs
detail'!$O$2:$O$518)

=SUMPRODUCT(--('Costs detail'!$Q$2:$Q518=DATE(2008,2,1)),--('Costs
detail'!$Q$2:$Q518<=DATE(2008,4,30)),'Costs detail'!$O$2:$O$518)


--
Biff
Microsoft Excel MVP


"spudsnruf" wrote in message
...
Thanks Very much (and noted the comment about different sized ranges). Is
there actually a way of doing the dates within the formula something like
this..

SUMIF('Costs detail'!$Q$2:$Q518,Date1,2,2008,Date<30,4,2008,'C osts
detail'!$O$2:$O$542)...ie so that within the formula I list the date
before
and after that I want to apply?

Thanks


"T. Valko" wrote:

One way...

A8 = start date = 2/1/2008
A9 = end date = 4/30/2008

=SUMIF('Costs detail'!$Q$2:$Q518,"="&A8,'Costs
detail'!$O$2:$O$518)-=SUMIF('Costs detail'!$Q$2:$Q518,""&A9,'Costs
detail'!$O$2:$O$518)

Note that in your posted formula you have different sized ranges:

$Q$2:$Q518
$O$2:$O$542



--
Biff
Microsoft Excel MVP


"spudsnruf" wrote in message
...
Hello

I would like to learn how to calculate amonts in a sumif that are
between
2
dates.

eg =SUMIF('Costs detail'!$Q$2:$Q518,A8,'Costs detail'!$O$2:$O$542)
.....where A8 is currently just a month reference (I mean it looks at
cell
A8
where I type in the month). So in other words, I'd like it to look up
values
in another worksheet called Costs Detail, providing the associated
dates
are
between, say 1st Feb and end of April. Any help always please.






  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 46
Default calculating between 2 given dates

That perfect. Worked a treat. Much appreciated

"T. Valko" wrote:

calculate amonts in a sumif that are between 2 dates.


In 99 out of 100 cases when someone says "between 2 dates" what they really
mean is greater than or equal to a start date and less than or equal to an
end date.

SUMIF('Costs detail'!$Q$2:$Q518,Date1,2,2008,Date<30,4,2008,'C osts
detail'!$O$2:$O$542)...


The logic of the above would *exclude* the following dates (m/d/y format):

2/1/2008
4/30/2008


Try one of these:

=SUMIF('Costs detail'!$Q$2:$Q518,"="&DATE(2008,2,1),'Costs
detail'!$O$2:$O$518)-SUMIF('Costs
detail'!$Q$2:$Q518,""&DATE(2008,4,30),'Costs
detail'!$O$2:$O$518)

=SUMPRODUCT(--('Costs detail'!$Q$2:$Q518=DATE(2008,2,1)),--('Costs
detail'!$Q$2:$Q518<=DATE(2008,4,30)),'Costs detail'!$O$2:$O$518)


--
Biff
Microsoft Excel MVP


"spudsnruf" wrote in message
...
Thanks Very much (and noted the comment about different sized ranges). Is
there actually a way of doing the dates within the formula something like
this..

SUMIF('Costs detail'!$Q$2:$Q518,Date1,2,2008,Date<30,4,2008,'C osts
detail'!$O$2:$O$542)...ie so that within the formula I list the date
before
and after that I want to apply?

Thanks


"T. Valko" wrote:

One way...

A8 = start date = 2/1/2008
A9 = end date = 4/30/2008

=SUMIF('Costs detail'!$Q$2:$Q518,"="&A8,'Costs
detail'!$O$2:$O$518)-=SUMIF('Costs detail'!$Q$2:$Q518,""&A9,'Costs
detail'!$O$2:$O$518)

Note that in your posted formula you have different sized ranges:

$Q$2:$Q518
$O$2:$O$542



--
Biff
Microsoft Excel MVP


"spudsnruf" wrote in message
...
Hello

I would like to learn how to calculate amonts in a sumif that are
between
2
dates.

eg =SUMIF('Costs detail'!$Q$2:$Q518,A8,'Costs detail'!$O$2:$O$542)
.....where A8 is currently just a month reference (I mean it looks at
cell
A8
where I type in the month). So in other words, I'd like it to look up
values
in another worksheet called Costs Detail, providing the associated
dates
are
between, say 1st Feb and end of April. Any help always please.






  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default calculating between 2 given dates

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"spudsnruf" wrote in message
...
That perfect. Worked a treat. Much appreciated

"T. Valko" wrote:

calculate amonts in a sumif that are between 2 dates.


In 99 out of 100 cases when someone says "between 2 dates" what they
really
mean is greater than or equal to a start date and less than or equal to
an
end date.

SUMIF('Costs detail'!$Q$2:$Q518,Date1,2,2008,Date<30,4,2008,'C osts
detail'!$O$2:$O$542)...


The logic of the above would *exclude* the following dates (m/d/y
format):

2/1/2008
4/30/2008


Try one of these:

=SUMIF('Costs detail'!$Q$2:$Q518,"="&DATE(2008,2,1),'Costs
detail'!$O$2:$O$518)-SUMIF('Costs
detail'!$Q$2:$Q518,""&DATE(2008,4,30),'Costs
detail'!$O$2:$O$518)

=SUMPRODUCT(--('Costs detail'!$Q$2:$Q518=DATE(2008,2,1)),--('Costs
detail'!$Q$2:$Q518<=DATE(2008,4,30)),'Costs detail'!$O$2:$O$518)


--
Biff
Microsoft Excel MVP


"spudsnruf" wrote in message
...
Thanks Very much (and noted the comment about different sized ranges).
Is
there actually a way of doing the dates within the formula something
like
this..

SUMIF('Costs detail'!$Q$2:$Q518,Date1,2,2008,Date<30,4,2008,'C osts
detail'!$O$2:$O$542)...ie so that within the formula I list the date
before
and after that I want to apply?

Thanks


"T. Valko" wrote:

One way...

A8 = start date = 2/1/2008
A9 = end date = 4/30/2008

=SUMIF('Costs detail'!$Q$2:$Q518,"="&A8,'Costs
detail'!$O$2:$O$518)-=SUMIF('Costs detail'!$Q$2:$Q518,""&A9,'Costs
detail'!$O$2:$O$518)

Note that in your posted formula you have different sized ranges:

$Q$2:$Q518
$O$2:$O$542



--
Biff
Microsoft Excel MVP


"spudsnruf" wrote in message
...
Hello

I would like to learn how to calculate amonts in a sumif that are
between
2
dates.

eg =SUMIF('Costs detail'!$Q$2:$Q518,A8,'Costs detail'!$O$2:$O$542)
.....where A8 is currently just a month reference (I mean it looks
at
cell
A8
where I type in the month). So in other words, I'd like it to look
up
values
in another worksheet called Costs Detail, providing the associated
dates
are
between, say 1st Feb and end of April. Any help always please.








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
Calculating dates countrygirl0712 Excel Worksheet Functions 3 March 18th 08 05:20 PM
CALCULATING DATES spudpeeps New Users to Excel 3 December 6th 07 11:40 AM
Calculating dates Toby0320 Excel Worksheet Functions 11 July 18th 06 04:52 PM
Calculating number of days between two dates that fall between two other dates [email protected] Excel Discussion (Misc queries) 5 October 26th 05 06:18 PM
I need help calculating dates? jeda67 Excel Worksheet Functions 4 August 30th 05 02:14 PM


All times are GMT +1. The time now is 08:32 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"