- Select the range of values to which you want to apply a custom format.
- Open the Format Cells menu by using the Ctrl + 1 keyboard shortcut.
- Go to the Number tab in the Format Cells menu.
- Select the Custom option in the Category section
- Enter the
#,##0;-$#,##0;
format string into the Type field.
Press the OK button.