When you set the Calculated datatype to Number in SP2010, SP2013 or Office365 the contents of the Calculated Column is interpreted as HTML without the need for any additional coding.
In SP2013 the proper way to do it is coding CSR/JSlink but the above workaround (setting datatype to Number) still works
your example
="<DIV><a href='https://taf.sharepoint.com/KB/SitePages/Home.aspx'>Branding</a></DIV>"
Displays the same link for every table row
If you have a URL for a ListItem in a TEXT column named: URL
you can built the Calculated Column HTML more dynamic:
="<DIV><a href='"&[URL]&"'>Branding</a></DIV>"
Remember to set the datatype to number:
Some notes:
A lot is possible in the Calculated Column it is just a pain to debug
- You can not use the SCRIPT tag since SP2013 update of around may 2013.. might still work in 2010
- Only Text, Choice, & Date fields are available for Calculated Columns;
eg. the Multiline Text / Description field is not accessible (on 2013 again you can use CSR/JSlink)
- Because the datatype is Number the Column header will be aligned to the right
It is undocumented behaviour.. so like the SCRIPT tag being filtered, functionality might be changed by Microsoft without any warning
and this one took me some days to figure out: If you need a double quote inside a Calculated Column string you have to use the double notation to escape eg:
="<button onclick=""alert('I am ID: "&[ID]&" ')"">My ID is "&[ID]&"</button>"
The example code itself is stupid.. but proves you can execute Javascript
Next suggested read:
Calculated column with link - remove space / whitespace / slash
HTH
Danny Engelman