0

I am trying to get a calculated column to work, I have the first part working fine =IF([Week Day]="Monday",[Week Ending]-6) So if weekday is Monday then take 6 from week ending and that is todays date.

However when I try to add on the rest of the week days for IF Tuesday, IF Wednesday etc I get a failure. Is anyone able to provide a little bit of steering? Here is one the examples of what I have tried...

=IF(([Week Day]="Monday",[Week Ending]-6), IF([Week Day]="Tuesday",[Week Ending]-5-))

1 Answer 1

0

All of the if statements are nested and closed at the end of the formula:

=IF([Week day]="Monday",[Week Ending]-6,
IF([Week day]="Tuesday",[Week Ending]-5,
IF([Week day]="Wednesday",[Week Ending]-4,
IF([Week day]="Thursday",[Week Ending]-3,
IF([Week day]="Friday",[Week Ending]-2,
)))))

(untested but from a similar formula...)

3
  • Unfortunately that did not work, it comes back with an error...
    – Roisin
    Commented May 4, 2018 at 13:28
  • JJD this did actually work in the end. Had to be a single line and include a space after every comma (even though SharePoint removes these once the codes are applied. Thanks for the help
    – Roisin
    Commented May 4, 2018 at 19:47
  • Oh you're right, I forgot about the spaces and line breaks. Makes it much more readable but doesn't actually work in Sharepoint...
    – JJD
    Commented May 7, 2018 at 14:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.