#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 331
Default MTD / YTD

Hi all,
Probably a simple question but I'm stuck. What date formulas can I use to
summarize month to date and year to date data? I want to link it to todays
date. Please advice.
Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default MTD / YTD

With date in A1

=DATEDIF(A1,TODAY(),"m")

=DATEDIF(A1,TODAY(),"y")

If this post helps click Yes
---------------
Jacob Skaria


"Greg" wrote:

Hi all,
Probably a simple question but I'm stuck. What date formulas can I use to
summarize month to date and year to date data? I want to link it to todays
date. Please advice.
Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default MTD / YTD

Lets say you have a list of dates in column A, values in column B
YTD:
=SUMIF(A:A,"<="&TODAY(),B:B)
MTD:
=SUMPRODUCT(--(MONTH(A2:A100)=MONTH(TODAY())),--(A2:A100<=TODAY()),B2:B100)

note that SUMPRODUCT can't reference entire columns (A:A:) unless using XL
2007.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Greg" wrote:

Hi all,
Probably a simple question but I'm stuck. What date formulas can I use to
summarize month to date and year to date data? I want to link it to todays
date. Please advice.
Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default MTD / YTD

Luke M wrote:
Lets say you have a list of dates in column A, values in column B
YTD:
=SUMIF(A:A,"<="&TODAY(),B:B)
MTD:
=SUMPRODUCT(--(MONTH(A2:A100)=MONTH(TODAY())),--(A2:A100<=TODAY()),B2:B100)

note that SUMPRODUCT can't reference entire columns (A:A:) unless using XL
2007.



Your formulas assume that there is only data for this year in the list.
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default MTD / YTD

Hi,

Turn on AutoFilter and open the one over your date field and choose Date
Filters, Year to Date, or This Month. That's if you are using 2007.

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Greg" wrote:

Hi all,
Probably a simple question but I'm stuck. What date formulas can I use to
summarize month to date and year to date data? I want to link it to todays
date. Please advice.
Thanks!



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default MTD / YTD

The general formula approach would be

YTD:

=SUMPRODUCT(--(YEAR(A1:A14)=YEAR(NOW())),B1:B14)

MTD:

=SUMPRODUCT(--(YEAR(A1:A14)=YEAR(NOW())),--(MONTH(A1:A14)=MONTH(NOW())),B1:B14)

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Glenn" wrote:

Luke M wrote:
Lets say you have a list of dates in column A, values in column B
YTD:
=SUMIF(A:A,"<="&TODAY(),B:B)
MTD:
=SUMPRODUCT(--(MONTH(A2:A100)=MONTH(TODAY())),--(A2:A100<=TODAY()),B2:B100)

note that SUMPRODUCT can't reference entire columns (A:A:) unless using XL
2007.



Your formulas assume that there is only data for this year in the list.

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default MTD / YTD

Oops I misread... Another way

=SUMPRODUCT(--(TEXT(A1:A14,"mmyyyy")=TEXT(TODAY(),"mmyyyy")),B1: B14)

You can adjust mmyyyy to mm for referring just the month
and to yyyy for referring just the year....

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

With date in A1

=DATEDIF(A1,TODAY(),"m")

=DATEDIF(A1,TODAY(),"y")

If this post helps click Yes
---------------
Jacob Skaria


"Greg" wrote:

Hi all,
Probably a simple question but I'm stuck. What date formulas can I use to
summarize month to date and year to date data? I want to link it to todays
date. Please advice.
Thanks!

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



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

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

About Us

"It's about Microsoft Excel"