Home » excel » Create an excel formula where ("Monday" – 1) = "Sunday"

Create an excel formula where ("Monday" – 1) = "Sunday"

Posted by: admin May 14, 2020 Leave a comment

Questions:

Lets say in Column A there are days of the week (“Monday”) and in the B Column I want a formula to output the day before (“Sunday”). Does anyone know which formula could make this possible short of creating a nested If function that asks for lists each day of the week?

Thanks!

How to&Answers:

If they are just text strings and not a date formatted dddd then use this formula:

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

enter image description here


Found a shorter formula:

=TEXT(SUMPRODUCT((ROW($1:$7))*(TEXT(ROW($2:$8),"dddd")=A1)),"dddd")

enter image description here