Microsoft Excel Question:
Download Questions PDF

Is it possible to determine the day of the week for a particular date?

Answer:

Yes, and Excel offers several ways to do so. Assume that cell A1 contains a date value. The formula below uses the WEEKDAY function, which returns an integer between 1 and 7 (1 for Sunday, 2 for Monday, and so on).

=WEEKDAY(A1)

If you'd prefer to see words rather than integers, modify the formula as follows:

=CHOOSE(WEEKDAY(A1), "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")

Another approach is to change the number format for the date cell. Activate the cell that contains your date, and then choose Format, Cells. In the Format Cells dialog box, click the Number tab. Choose Custom from the Category list, and type a custom number format string into the box labeled Type. The trick here is to use dddd as part of the format string. For example, a format string of dddd mmmm d, yyyy will display the date and the day of the week, like this: Thursday November 23, 2000.

Download MS Excel Interview Questions And Answers PDF

Previous QuestionNext Question
I need to determine the difference between two times. If the difference is positive, it works fine. But Excel does not want to display negative time values. Why not?I have a worksheet that shows total hours and minutes worked, along with the hourly pay rate. When I multiply these vales, I do not get the result I am looking for. What is wrong?