weekday retunrs wrong number

kizzie37

Well-known Member
Joined
Oct 23, 2007
Messages
585
Office Version
  1. 365
I am using weekday against a date in 2010, I ahve run into date format issues previously, the weekday is returing the worng day number for the date in question

can anyone help?
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Please post the formula, as you have it written, and give an example of date that is not returning what you expect.
 
Upvote 0
this is the date reference in cell A2 (1/4/2011) its formatted in English US,

- this is the formulas =IF(A2="","",WEEKDAY(A2)

the result I get is 3, it should be 2, in every case it is calculating a number either die of the correct one.

I know its something to do with the with the date formatting, in excel, but have no idea how to fix it.

I tired just using =IF(A2="","",WEEKDAY(A2)-1) but found dates further down then became incorrect also
 
Upvote 0
3 is actually correct. 1/4/2011 was a Tuesday, and Tuesday is the third day of the week (Sunday, Monday, Tuesday).

If you want your week to start on Monday, make use of the 2nd argument in the WEEKDAY function, i.e.

=WEEKDAY(A2,2)
will return 2

Here is write-up with the different arguments and options of the WEEKDAY functions: http://www.techonthenet.com/excel/formulas/weekday.php
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,879
Members
452,948
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top