Or just use Validation, found under the Data drop down box. This allows you to specify the conditions of the values entered into the specific cells, and allows you to return an error message for incorrect values.
Edit: Validation will only work if a hard coded value is being typed into the cell. If it is a formula, link, or is pasted into the cell, use the code jimboy provided.