Select the cells you want to lock and press the F4  key to put a $ sign. Press  f4 again to lock or unlock the cells.