Automatize WEEKDAY function

matitaccia

New Member
Joined
Jan 2, 2017
Messages
2
Dear All,

I currently dispose of a working sheet which I use to keep track of my working hours. We recently have upgraded our Microsoft Office 2010 to Microsoft Office 365 and this particular sheet has stopped working correctly: it shows a lot of #value! errors.

I have found how to correct the the #value! errors, but I think that there should be a better way to solve this.

The function which is creating mistakes is the following one:

Code:
=WEEKDAY(D11 & "/" & $E$5 & "/" & Anno,2)

were D11 is a cell containing the number of the day in the month (1 --> 31), while E5 refers to the month and "Anno" refers to current year. In order to solve the issue I tried to use the WEEKDAY syntax as explained on the Microsoft Support page, i.e. by translating 01.01.2017 in the number 42736. If this transformation is performed, the file works again. This would mean though, that with every new year the number should be added manually: this wasn't happening before.

By observing the syntax used originally it seems to me that, by giving Excel the day number, month and the year Excel was able to automatically understand the correct weekday: I would like to have it that way again.

Anyone has suggestions on how to modify the syntax used?

Thank you very much,

matitaccia
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,215,063
Messages
6,122,935
Members
449,094
Latest member
teemeren

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