Select the cells that you want to format.
Right click in the selection and choose Format Cells
Click on Custom and enter in the Type box ###;(###) if you don't need the , separator for thousands
enter #,###;(#,###) if you need the comma separator.