Day of week

dpaton05

Well-known Member
Joined
Aug 14, 2018
Messages
2,352
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Is there a function you can put in a cell that will calculate whether a date that is entered in another cell is a weekday, weekend or public holiday?
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
You'd have to provide a list of public holidays; Excel doesn't store that information. Once you have them then it's relatively simple:


Book1
ABCD
1Public HolidaysDateType of day
201/01/201801/05/2018Weekday
330/03/201802/05/2018Weekday
402/04/201803/05/2018Weekday
507/05/201804/05/2018Weekday
628/05/201805/05/2018Weekend
727/08/201806/05/2018Weekend
825/12/201807/05/2018Public Holiday
926/12/201808/05/2018Weekday
1009/05/2018Weekday
1110/05/2018Weekday
1211/05/2018Weekday
1312/05/2018Weekend
1413/05/2018Weekend
1514/05/2018Weekday
1615/05/2018Weekday
1716/05/2018Weekday
1817/05/2018Weekday
1918/05/2018Weekday
2019/05/2018Weekend
2120/05/2018Weekend
2221/05/2018Weekday
2322/05/2018Weekday
2423/05/2018Weekday
2524/05/2018Weekday
2625/05/2018Weekday
2726/05/2018Weekend
2827/05/2018Weekend
2928/05/2018Public Holiday
3029/05/2018Weekday
3130/05/2018Weekday
3231/05/2018Weekday
Sheet1
Cell Formulas
RangeFormula
D2=IF(ISNUMBER(MATCH($C2,$A$2:$A$9,0)),"Public Holiday",IF(WEEKDAY($C2,2)>5,"Weekend","Weekday"))


WBD
 
Upvote 0
I have a list of public holidays.

labour dayFirst Monday in October
New years dayFirst day in january

australia day26-Jan
Easter Sunday
??? Unsure how to calculate
Easter SaturdayDay before easter Sunday
Easter Friday2 Days before easter Sunday
Easter MondayDay after Easter Sunday
Anzac Day
25th aprill

Queen's birthdaySecond Monday in June
labour dayFirst Monday in October
Christmas Day25-Dec
Boxing Day


26-Dec






<tbody>
</tbody>
I am trying to make a spreadsheet that will be used to generate quotes for my work. The quotes will differ in price, depending on whether the date is a weekday, weekend or public holiday. Could anyone please help me with a function that I can enter into a cell for the start of my total function to go in my quote price cell?

Thanks,
Dave
 
Upvote 0

Forum statistics

Threads
1,214,826
Messages
6,121,792
Members
449,048
Latest member
greyangel23

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