Updating a formula in excel

dpaton05

Well-known Member
Joined
Aug 14, 2018
Messages
2,392
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I have a formula that correctly returns if a date is a mon-fri, weekend or public holiday.

Code:
=IF(A11="","",IF(COUNTIF(Sheet2!$G$87:$DO$97,A11),"Public Holiday",IF(WEEKDAY(A11,2)>5,"Weekend","Mon-Fri")))

I need it to now determine if the day is a mon-fri, saturday, sunday or public holiday.

Can someone help me with the excel formula to achieve this please?
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Holidays is a named range that holds the dates of all public holidays for the current year or the year pertinent to the range of dates that might be entered in cell A11.
Rich (BB code):
=IF(A11="","",IF(ISNUMBER(MATCH(A11,Holidays,0)),"Public Holiday",CHOOSE(WEEKDAY(A11),"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")))
 
Last edited:
Upvote 0
Thanks Joe but I already worked it out with this formula

Code:
=IF(A11="","",IF(COUNTIF(Sheet2!$G$87:$DO$97,A11),"Public Holiday",IF(WEEKDAY(A11)=1,"Sunday",IF(WEEKDAY(A11)=7,"Saturday","Mon-Fri"))))
 
Upvote 0
A little shorter

Code:
=IF(A11="","",IF(COUNTIF(Sheet2!$G$87:$DO$97,A11),"Public Holiday",LOOKUP(WEEKDAY(A11,2),{1,6,7},{"Mon-Fri","Saturday","Sunday"})))
 
Upvote 0

Forum statistics

Threads
1,224,814
Messages
6,181,125
Members
453,021
Latest member
Justyna P

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