Updating a formula in excel

dpaton05

Well-known Member
Joined
Aug 14, 2018
Messages
1,042
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?
 

JoeMo

MrExcel MVP
Joined
May 26, 2009
Messages
16,645
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:

dpaton05

Well-known Member
Joined
Aug 14, 2018
Messages
1,042
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"))))
 

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
7,958
Office Version
2007
Platform
Windows
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"})))
 

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
7,958
Office Version
2007
Platform
Windows
Youre welcome, thanks for the feedback.
 

Forum statistics

Threads
1,078,504
Messages
5,340,766
Members
399,394
Latest member
farlow

Some videos you may like

This Week's Hot Topics

  • Problem with Radio Button's format control
    I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
  • Last Display on userform to a Listbox
    [CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
  • Rename and move files to a new location
    Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
  • Help with True/False Formula
    Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
  • Clear extra characters from a provided range of cells
    Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
  • Help with Current and highest streaks
    Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...
Top