Convert weekday string to number in Excel and Google Sheets

=MATCH(A2,{"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"},0)

=MATCH(A3,{"Sunday","Tuesday","Wednesday","Thursday","Friday","Saturday","Monday"},0)

A2 = week starting on Monday; A3 = week starting on Sunday

Check below for a detailed explanation with pictures and how to use formulas in Excel and Google Sheets.