=SUMPRODUCT(--(TEXT(ROW(INDIRECT(A1&":"&A2)),"ddd")="Mon"))
“Mon” can be replaced with any other day of the week as per need.
33. Maximum Times a Particular Entry Appears Consecutively
Suppose, we want to count maximum times “A” appears consecutively, you may use
following Array formula -
=MAX(FREQUENCY(IF(A2:A20="A",ROW(A2:A20)),IF(A2:A20<>"A",ROW(A2:A20))))
Note - Array Formula is not entered by pressing ENTER after entering your formula but by
pressing CTRL+SHIFT+ENTER. If you are copying and pasting this formula, take F2 after
pasting and CTRL+SHIFT+ENTER. This will put { } brackets around the formula which you
can see in Formula Bar. If you edit again, you will have to do CTRL+SHIFT+ENTER again.
Don't put { } manually.
34. Find the Next Week of the Day
There are 2 scenarios in this case. For example, if today’s date is 2-Jan-17 (Monday) and I
try to find the next Monday, I can get either 2-Jan-17 or 9-Jan-17 as per need. For Tuesday
to Sunday, it is not a problem as they come after 2-Jan-17 only.
Case 1 - If the Day falls on the same date, then that very date (Hence, in case of 2-Jan-
17, next Monday would be 2-Jan-17 only)
Next Mon =CEILING($A$1-2,7)+
Next Tue =CEILING($A$1-3,7)+
Next Wed =CEILING($A$1-4,7)+