Nested IF Formula not working

#1

I am trying to convert between WEEKDAY(TODAY() and the word version for the day of the week. I would imagine it is a common need.

This works just fine.

IF(WEEKDAY(TODAY())=1,“Monday”, “”)

Why might this not work?

IF(WEEKDAY(TODAY()) = 1,”Monday”,
IF(WEEKDAY(TODAY()) = 2,”Tuesday”, ”Wednesday”))

My error: Sorry, there was a problem saving this field. Invalid formula. Please check your formula text.

#2

The problem is the `”`'s in your formula. You’re using curly quotes. Airtable only recognizes straight quotes which look like this `"`. Replace the curly quotes with straight ones and your formula works, your nesting is perfectly fine as is.

#3

Those curly quotes are the devil. God knows why Apple use them as standard.

#4

It is not curly quotes. I checked that. It was formatted that way by this form. I am using strait quotes and it isn’t working.

#5

Here is the screen shot.

#6

Well now youre missing the closing quote after Wednesday

#7

Got it! Thanks so much! Here is the final working formula in case someone needs it. I actually had to go in and pick the functions out of the list. For some reason copy and paste isn’t great for making functions.

IF(WEEKDAY(TODAY())=1,“Monday”, IF(WEEKDAY(TODAY())=2,“Tuesday”, IF(WEEKDAY(TODAY())=3,“Wednesday”, IF(WEEKDAY(TODAY())=4,“Thursday”, IF(WEEKDAY(TODAY())=5,“Friday”, IF(WEEKDAY(TODAY())=6,“Saturday”, IF(WEEKDAY(TODAY())=7,“Sunday”,“Date Error”)))))))

#8

You could make this a little more compact by using SWITCH instead. I recently did something similar where I needed to convert from the numeric value returned by MONTHS into the abbreviated month name. Here’s how I’d structure it in your case for the weekdays:

``````SWITCH(WEEKDAY(TODAY()), 1, "Monday", 2, "Tuesday", 3, "Wednesday", 4, "Thursday",
5, "Friday", 6, "Saturday", 7, "Sunday", "Date Error")``````

#9

Thanks so much! I was actually looking for a SWITCH or CASE statement to work with and only found the nested IF.