Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello everyone,
How could I test in Excel that the weekday is between Monday and Friday, in other words, the weekday can only be: Monday, Tuesday, Wednesday, Thursday and Friday. Thanks very much Tom |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tom,
=AND(WEEKDAY(A1)1,WEEKDAY(A1)<7) Returns TRUE or FALSE -- Kind regards, Niek Otten Microsoft MVP - Excel "tom" wrote in message ... | Hello everyone, | | How could I test in Excel that the weekday is between Monday and Friday, in | other words, the weekday can only be: Monday, Tuesday, Wednesday, Thursday | and Friday. | | Thanks very much | Tom |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Not sure if this is a *programming* question...
The testing part is fairly easy: This formula returns TRUE if the date in A! is a Monday thru Friday. FALSE if a weekend: =WEEKDAY(A1,2)<6 (Note: you can also use the WEEKDAY function in VBA) Does that get you headed in the right direction? *********** Regards, Ron XL2002, WinXP "tom" wrote: Hello everyone, How could I test in Excel that the weekday is between Monday and Friday, in other words, the weekday can only be: Monday, Tuesday, Wednesday, Thursday and Friday. Thanks very much Tom |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Niek and Ron,
thanks very much for your quick answer. What should A1 contain please ? in my case, A1 should be the today day: "Monday", "tuesday", "wednesday", "thursday" or "friday". Does the condition you mentioned still work ? Please help Thanks very much and regards Tom "Niek Otten" wrote: Hi Tom, =AND(WEEKDAY(A1)1,WEEKDAY(A1)<7) Returns TRUE or FALSE -- Kind regards, Niek Otten Microsoft MVP - Excel "tom" wrote in message ... | Hello everyone, | | How could I test in Excel that the weekday is between Monday and Friday, in | other words, the weekday can only be: Monday, Tuesday, Wednesday, Thursday | and Friday. | | Thanks very much | Tom |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If A1 is a text entry (Monday, Tuesday, etc)....
Here's something to try: B1: =SUM(COUNTIF(A1,{"Saturday","Sunday","Monday","Tue sday","Wednesday","Thursday","Friday"})*{1,2,3,4,5 ,6,7})2 Note: In case text wrap impacts the display, there are NO spaces in that formula Does that help? *********** Regards, Ron XL2002, WinXP "tom" wrote: Hi Niek and Ron, thanks very much for your quick answer. What should A1 contain please ? in my case, A1 should be the today day: "Monday", "tuesday", "wednesday", "thursday" or "friday". Does the condition you mentioned still work ? Please help Thanks very much and regards Tom "Niek Otten" wrote: Hi Tom, =AND(WEEKDAY(A1)1,WEEKDAY(A1)<7) Returns TRUE or FALSE -- Kind regards, Niek Otten Microsoft MVP - Excel "tom" wrote in message ... | Hello everyone, | | How could I test in Excel that the weekday is between Monday and Friday, in | other words, the weekday can only be: Monday, Tuesday, Wednesday, Thursday | and Friday. | | Thanks very much | Tom |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
A shorter alternative:
=SUM(COUNTIF(A1,TEXT("12/30/2005"+{1,2,3,4,5,6,7},"dddd"))*{1,2,3,4,5,6,7})2 *********** Regards, Ron XL2002, WinXP "tom" wrote: Hi Niek and Ron, thanks very much for your quick answer. What should A1 contain please ? in my case, A1 should be the today day: "Monday", "tuesday", "wednesday", "thursday" or "friday". Does the condition you mentioned still work ? Please help Thanks very much and regards Tom "Niek Otten" wrote: Hi Tom, =AND(WEEKDAY(A1)1,WEEKDAY(A1)<7) Returns TRUE or FALSE -- Kind regards, Niek Otten Microsoft MVP - Excel "tom" wrote in message ... | Hello everyone, | | How could I test in Excel that the weekday is between Monday and Friday, in | other words, the weekday can only be: Monday, Tuesday, Wednesday, Thursday | and Friday. | | Thanks very much | Tom |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula to display next Friday from B1 works except on the Friday itself. | Excel Discussion (Misc queries) | |||
Calculating and listing only Monday-Friday in a work schedule | Excel Discussion (Misc queries) | |||
Help change Friday to following Monday | Excel Discussion (Misc queries) | |||
Function to write Weekday - Monday, Tuesday etc | Excel Discussion (Misc queries) | |||
Setting WEEKDAY function to Exclude Friday in Calculation | Excel Programming |