Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default date filtering by number

I have a spreadsheet that lists, with start dates in column C. I would
like to be able to automatically number the dates which fall within
the same week

example, if start date falls within this week, column D will be
labelled as 1. if start date falls within next week, column D will be
labelled as 2. if start date falls within 3rd week, column D will be
labelled as 3.... and so on...

Can anyone clue me in as to how to do this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 913
Default date filtering by number

On Fri, 9 Oct 2009 19:53:03 -0700 (PDT), Lynn
wrote:

I have a spreadsheet that lists, with start dates in column C. I would
like to be able to automatically number the dates which fall within
the same week

example, if start date falls within this week, column D will be
labelled as 1. if start date falls within next week, column D will be
labelled as 2. if start date falls within 3rd week, column D will be
labelled as 3.... and so on...

Can anyone clue me in as to how to do this?



Assuming that a week starts on a Monday, try this formula in cell D1:

=1+INT((C1-TODAY()+WEEKDAY(TODAY(),3))/7)

Hope this helps / Lars-Åke
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default date filtering by number

You can return the week number of a date we can use the WEEKNUM formula.
This will return a number that indicates where the week falls numerically
within a year.
If this function is not available, and returns the #NAME? error, install and
load the Analysis ToolPak add-in. €“ from your menu bar - ToolsAdd-ins.

Formula syntax for the WEEKNUM formula:-

WEEKNUM(serial_num,return_type)

Serial_num is a valid date.
Return_type is a number that determines the day the week begins.

- Return_type 1 Default, (it can be omitted) the week begins on a Sunday.

- Return_type 2, the week begins on a Monday.

example:

=WEEKNUM(C1) or =WEEKNUM(C1,2)


hope helpful

--
jb


"Lynn" wrote:

I have a spreadsheet that lists, with start dates in column C. I would
like to be able to automatically number the dates which fall within
the same week

example, if start date falls within this week, column D will be
labelled as 1. if start date falls within next week, column D will be
labelled as 2. if start date falls within 3rd week, column D will be
labelled as 3.... and so on...

Can anyone clue me in as to how to do this?

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
Find first row number after filtering StevenM Excel Programming 3 August 6th 09 06:01 PM
Filtering by a date CR Excel Discussion (Misc queries) 3 February 18th 09 08:22 PM
Filtering and Text/number problems Jugglertwo Excel Discussion (Misc queries) 3 September 26th 08 06:24 PM
Not filtering by date chOcO Excel Programming 7 December 8th 04 01:24 AM
Not filtering by date chOcO Excel Programming 4 December 7th 04 03:19 AM


All times are GMT +1. The time now is 05:24 AM.

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"