+ Reply to Thread
Results 1 to 5 of 5

WEEKDAY function returns wrong day of the week

  1. #1
    Registered User
    Join Date
    03-17-2021
    Location
    India
    MS-Off Ver
    Microsoft 365
    Posts
    5

    WEEKDAY function returns wrong day of the week

    Hi Experts,

    I am trying to find out the day of the week by using the WEEKDAY function, I want Monday to be day 1 and Sunday day 7, so I am entering my formula like this =WEEKDAY(A2,2)

    I have attached the file I am using, kindly check and revert back to me with a solution, I am really confused why is it not working?

    Thanks,
    ExcelGuyB
    Attached Files Attached Files
    Last edited by excelguyb; 03-17-2021 at 06:02 AM.

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: WEEKDAY function returns wrong day of the week

    Hi,

    Why do you think the answers are incorrect? I randomly checked a few values, and the answers returned by the function seem fine to me. The error seems to be in the function used by you in the C column

    Put this in C2 and drag down

    =INDEX({"Mon";"Tue";"Wed";"Thu";"Fri";"Sat";"Sun"},B2)
    Last edited by NeedForExcel; 03-17-2021 at 04:48 AM.
    Cheers!
    Deep Dave

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: WEEKDAY function returns wrong day of the week

    If you want to see the weekday as a word, try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    03-17-2021
    Location
    India
    MS-Off Ver
    Microsoft 365
    Posts
    5

    Re: WEEKDAY function returns wrong day of the week

    Thanks a lot, I think the problem is with locale setting, maybe somehow Excel is picking day 1 as Sun, however, the calendar shows Mon as day 1, anyways the index did solve the problem, however, I just tried changing the format to DDD and that should have given me the correct results.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: WEEKDAY function returns wrong day of the week

    You're welcome.

    You can only get the weekday as a number from the date. Given the setting you have used, Monday is weekday 1. You can't take that 1 and convert it a textual description ... unless you use it as an index as shown.

    TEXT can be used to get the textual description. You could also just copy the date and use a custom format.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Min() function returns wrong value
    By NKuip in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-03-2017, 09:06 AM
  2. [SOLVED] IF Function Returns Wrong Answer
    By EverClever in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-12-2017, 12:54 PM
  3. IF Function Returns Wrong Answer
    By EverClever in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 07-28-2017, 02:05 PM
  4. [SOLVED] Use a Sum If weekday function to return hours worked by day of week
    By jbeets in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-19-2015, 07:45 PM
  5. VBA Vlookup function returns wrong values
    By alicelia in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-29-2015, 12:09 AM
  6. Row() function returns wrong row and more..
    By Kim in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-10-2006, 09:14 PM
  7. My Datedif function only returns 0's in the cell what's wrong?
    By Tom in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-13-2006, 02:45 PM

Tags for this Thread

Bookmarks

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