PC Review


Reply
Thread Tools Rate Thread

current week, current month, current year

 
 
joemeshuggah
Guest
Posts: n/a
 
      14th Oct 2008
is it possible (either via vba or some function in excel) to indicate where a
particular date falls (e.g. within the current week, current month, and
current year)?

looking to create a report that identifies records as falling into current
week, current month (excluding those that fall within current week), and year
to date (excluding those that fall within current week and current month).
 
Reply With Quote
 
 
 
 
Joel
Guest
Posts: n/a
 
      14th Oct 2008
If your date is in A1

Current Year

if(year(A1)=year(today()),True,False)

Current Month

if(month(A1)=month((today()),True,False)

Current week depends on when the week starts (Saturday, Sunday, Monday)
for Sunday

=if(And(A1>=Today()-weekday(Today()),A1<Today()-weekday(Today())+6),true,false)




"joemeshuggah" wrote:

> is it possible (either via vba or some function in excel) to indicate where a
> particular date falls (e.g. within the current week, current month, and
> current year)?
>
> looking to create a report that identifies records as falling into current
> week, current month (excluding those that fall within current week), and year
> to date (excluding those that fall within current week and current month).

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Current year and current week number Grey Old Man Microsoft Excel Misc 9 8th Dec 2009 06:30 PM
How do I make my calendar open to the current week not the current Pat Microsoft Outlook Calendar 0 28th Mar 2008 09:03 PM
current month / year WHERE =?Utf-8?B?Sm9obkx1dGU=?= Microsoft Access Queries 8 13th Sep 2007 05:54 PM
Criteria for current month, current year =?Utf-8?B?Q1c=?= Microsoft Access Queries 6 7th Sep 2007 06:32 PM
How can the current week be the default starting week in Month View? Howie Microsoft Outlook 0 9th Mar 2005 06:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:51 AM.