Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to test whether a date entered by the user is a workday, so I
can use the "true" or "false" returned by the test in another formula in the spreadsheet. I have a cell range of holidays set up. The date entered by the user could be any date in the year and any day of the week. Thanks, Nolo |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Nolo,
Assuming date in E1, and the holidays in named range called holidays =AND(WEEKDAY(E1,2)<5,COUNTIF(holidays,E1)=0) -- HTH RP (remove nothere from the email address if mailing direct) wrote in message oups.com... I need to test whether a date entered by the user is a workday, so I can use the "true" or "false" returned by the test in another formula in the spreadsheet. I have a cell range of holidays set up. The date entered by the user could be any date in the year and any day of the week. Thanks, Nolo |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
oops. small error
=AND(WEEKDAY(E1,2)<6,COUNTIF(holidays,E1)=0) -- HTH RP (remove nothere from the email address if mailing direct) "Bob Phillips" wrote in message ... Nolo, Assuming date in E1, and the holidays in named range called holidays =AND(WEEKDAY(E1,2)<5,COUNTIF(holidays,E1)=0) -- HTH RP (remove nothere from the email address if mailing direct) wrote in message oups.com... I need to test whether a date entered by the user is a workday, so I can use the "true" or "false" returned by the test in another formula in the spreadsheet. I have a cell range of holidays set up. The date entered by the user could be any date in the year and any day of the week. Thanks, Nolo |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
with your holidays in the range E2:E6 and assuming that both saturday and sunday are non-workdays, the following formula will return "workday" or "not workday" for a date in A1 =IF(AND(WEEKDAY(A1)<1,WEEKDAY(A1)<7,ISNA(MATCH(A 1,E2:E6,0))),"weekday","not weekday") Cheers JulieD wrote in message oups.com... I need to test whether a date entered by the user is a workday, so I can use the "true" or "false" returned by the test in another formula in the spreadsheet. I have a cell range of holidays set up. The date entered by the user could be any date in the year and any day of the week. Thanks, Nolo |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=WORKDAY(A1-1,1,Holidays)=A1
Ron, I love the brilliant simplicity of your solution! Thanks so much. Nolo |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
DATE WORKDAY PROBLEM | Excel Discussion (Misc queries) | |||
How to shift a weekend date to the last or next workday | Excel Discussion (Misc queries) | |||
Workday return a Saturday date | Setting up and Configuration of Excel | |||
Workday Date Calculation | Excel Worksheet Functions | |||
workday date function | Excel Worksheet Functions |