If the referenced cells are in a locked worksheet, you will need to unprotect the sheet first by going to the Review tab and selecting Unprotect Sheet.