Weekday function not working correctly?

1. Weekday function not working correctly?

Hi everyone,

First post so sorry if it's not up to scratch. I'm using excel for a University assignment and I have to use the weekday function. What I am trying to acheive is having all the dates come up as numbers corresponding to the days. Instead I am getting a name error, I'm new at excel this is the first time I've ever used it so I am unsure of what to do. If I don't get a name error it gives me some silly date but no numbers. I'm also trying to figure out how to do something with the times on the excel sheet. I've added the excel file and the instructions I was given, the weekday and time instructions are on page 4 of the pdf. If anybody can help that would be great.

Thanks in advance.

2. Re: Weekday function not working correctly?

What have you tried so far?

3. Re: Weekday function not working correctly?

I've tried changing the return type, ctrl shift and enter and changing the date format. My class isn't on statistics or excel they just kind of threw a random task at us. There were tutorials provided by the uni but I get the error message when I follow them. I'm a complete newbie at excel so I'm completely lost on even trouble shooting.

4. Re: Weekday function not working correctly?

Page4 of your Pdf file, its all right there in black red and green. Doesnt say anything about ctrl shift and enter

You could create a new variable called dayofweek using the WEEKDAY function in Excel (there’s something very similar in SPSS). This will give you for each day a number 1 to 7. This will correspond to the days of the week. Make sure you understand the ‘type’ argument of the function. Depending on what you do, one type results in Sunday = 1, Monday = 2, ... Saturday = 7 and the other is Monday = 1, Tuesday = 2, ... Sunday = 7. The second one is better because of the next step.

So how do you look at weekday/weekend diﬀerences? If you’ve got the day of week information it is a breeze. Create a new variable called weekend? and use an IF function to determine if it’s a weekend or not. The function will look something like: IF(dayofweek >5, “YES”, “NO”) What this is doing is testing whether the value for dayofweek is higher than 5, or not. Day of week can only have values 1 to 7. So, if dayofweek is 6 or 7 we get a YES, but NO if it is 1 through 5.

5. Re: Weekday function not working correctly?

Okay, when I follow those steps. What I get after using the WEEKDAY function is the answer 1/7/1904, in the text box. The function I am using is =WEEKDAY (L2,2)

6. Re: Weekday function not working correctly?

Ok so did I. Good Job... Now just highlight the Entire Column and change the cell formatting from date to Number or general

7. Re: Weekday function not working correctly?

Format Cells as General

8. Re: Weekday function not working correctly?

That got it. Thank you so much for your help.

9. Re: Weekday function not working correctly?

No problem...

If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1