The NETWORKDAYS.INTL
functions accepts 4 arguments. In which the 3rd argument are the weekdays and in which it is binary-string type e.g. 1000000
(for monday only).
My problem is my sheet accepts array-string in a single cell. Which like for example Monday, Tuesday
.
My question is do we have available predefined function that converts Monday, Tuesday
to binary-string type e.g. 1100000
? If there are none, do you know how to do it? I'm thinking of regex but I don't know how to do it as well in the sheet.
I do not think there is such predefined function.
You can try:
=ArrayFormula(JOIN("",N(COUNTIF(MATCH(SPLIT("Monday, Tuesday",", ",0),{"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"},0),SEQUENCE(7))>0)))
MATCH
and get the 1-based index of the weekdays