Save your Excel file as an .xlsm, and go to the Developer Tab. Hit Visual Basic.
You'll get a new window called Microsoft Visual Basic for Applications. In that, hit Insert and then Module.
You can double click that module to get a space for your Function code. This script is customized to take one parameter (the project name) and build a path from it.
Hit save.
To use the custom fuction, you'll type it in like any other--make the cell =ProjLink() and include the project name between the parentheses. If you're operating inside a table, you can use [@ColumnName] to make the formula more readable.