SOLVED

Formula to match Day of Week Name

Copper Contributor

I want to get the day of the week from a date and then evaluate if that matches a cell with different days of the week.  8/28/2023 is a Monday (text(cell,"dddd")  I want the formula to indicat there is one occurrence of Monday in the dayofweek cell, result would be 1.  TY

 

Ron_Hockman1525_0-1681524458915.png

 

2 Replies
best response confirmed by Hans Vogelaar (MVP)
Solution

@Ron_Hockman1525 

 

For older versions of Excel, you may try the following formula...

=(LEN(A2)-LEN(SUBSTITUTE(A2,TEXT($B$1,"dddd"),"")))/LEN(TEXT($B$1,"dddd"))

CountDays.jpg

 

For Excel 365, you may also try the following formula...

=SUM((TEXTSPLIT(A2,"; ")=TEXT($B$1,"dddd"))*1)

 

Thank you!
1 best response

Accepted Solutions
best response confirmed by Hans Vogelaar (MVP)
Solution

@Ron_Hockman1525 

 

For older versions of Excel, you may try the following formula...

=(LEN(A2)-LEN(SUBSTITUTE(A2,TEXT($B$1,"dddd"),"")))/LEN(TEXT($B$1,"dddd"))

CountDays.jpg

 

For Excel 365, you may also try the following formula...

=SUM((TEXTSPLIT(A2,"; ")=TEXT($B$1,"dddd"))*1)

 

View solution in original post