0 minute read
I’ve looked for quite a while now for a good reference for what formulas are available to me when I create a calculated column in SharePoint. Today I think I stumbled on the easy answer: Excel.
Here’s a simple example. I wanted to return the year for the Created date. When I just used:
I got "2,007", but I wanted just "2007". I wasn’t sure of the syntax, so I went into Excel and created the formula:
which gave me what I wanted. (I know, this is so simple that I should have just known.) I took that formula and pasted into my Site Column calculation, replacing TODAY() with [Created], ending up with:
Exactly what I wanted.
Now, I expect that there are some differences between Excel formulas and SharePoint formulas, but in most cases, I think that this will be a reliable way to build them up, plus Excel gives you nice contextual help when you can’t remember things like "####" means 4 clean digits!