Solved

determining the ordernal number of a certain week day.

Posted on 2001-07-23
8
295 Views
Last Modified: 2010-05-18
How can I determining the ordernal number of a certain week day?

I mean, funtion(today()) should return 4. because today(7.23) is the 4th monday of this month.

and the number should be set unless a user saves.

Thanks.
0
Comment
Question by:iamjhkang
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 13

Accepted Solution

by:
cri earned 50 total points
ID: 6307651
Use WEEKDAY(serial_number,return_type)

See Excel Help regarding 'return_type' which defines the start of the week.
0
 
LVL 16

Expert Comment

by:theo kouwenhoven
ID: 6307745
To get the right day name with the weekday function, you can include it in an index function:

example:

=INDEX({"So","Mo","Tu","We","Th","Fr","Za"},1,WEEKDAY(TODAY()))


GL
0
 
LVL 6

Expert Comment

by:bkpchs237
ID: 6350781
jamjhkang,

If I understand your request correctly you want to know if a certain date is the first, second, third, fourth or fifth of a particular weekday of the month.  The following formula will accomplish the task.  However, you will need to activate the Analysis ToolPak thru the Tools, Add-ins menu option.

=IF(WEEKDAY(B1)=WEEKDAY(EOMONTH(B1,-1)),INT((B1-EOMONTH(B1,-1))/7),INT((B1-EOMONTH(B1,-1))/7)+1)

where B1 is the cell that you entered the date you want to analyze.

Hope this helps.
0
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 16

Expert Comment

by:theo kouwenhoven
ID: 6351240
What do you mean by "because today(7.23) is the 4th monday of this month"

Do you like to have:
- Daynumber of the week,
- Daynumber of the month
- Daynumber of the year
- Weeknumber of the month
- Weeknumber of the year.
- Month number of the year

Tell me, looking at the given comments, it's not very clear.

0
 
LVL 27

Expert Comment

by:Asta Cu
ID: 6467027
Is more needed?
Asta
0
 

Expert Comment

by:amp072397
ID: 6706550
iamjhkang, how are you?

I know the email notifications were working erratically at best before, but they work great now. If you don't respond within 7 days, I'll be awarding points to cri. Other answers may be valid, but he posted first.

amp
Community Support Moderator
0
 

Expert Comment

by:amp072397
ID: 6719568
Awarding points to cri.

amp
community support moderator
0
 
LVL 13

Expert Comment

by:cri
ID: 6721663
amp, thank you.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question