View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default current week, current month, current year

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).