You could enter the raw mark in one column, and have the 'adjusted' text show in a column next to it.

The formula would be IF(a1<40, "(" & A1 & ")", A1) - assuming that the raw mark is in A1.