ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Displaying zeros as dashes on a worksheet (https://www.excelbanter.com/excel-programming/327314-displaying-zeros-dashes-worksheet.html)

[email protected]

Displaying zeros as dashes on a worksheet
 
I have a spreadsheet where there are several zeros. I would like the
zeros displayed as dashes (-) but would like this to happen without a
VBA function or sub. And, I still need to perform mathematical
operations on the cell value...so while it displays as a dash I would
like it to be recognized as a zero.

Can this be accomplished using the Format features through the
interface? Or am I out of luck and going to have to do this through
VBA?

Thanks for your help,
Eric


Michael Malinsky[_2_]

Displaying zeros as dashes on a worksheet
 
You should be able to do this using the Accounting format.


wrote:
I have a spreadsheet where there are several zeros. I would like the
zeros displayed as dashes (-) but would like this to happen without a
VBA function or sub. And, I still need to perform mathematical
operations on the cell value...so while it displays as a dash I would
like it to be recognized as a zero.

Can this be accomplished using the Format features through the
interface? Or am I out of luck and going to have to do this through
VBA?

Thanks for your help,
Eric



John Green

Displaying zeros as dashes on a worksheet
 
Eric,

This can be done with formatting under Format|Cells|Number. Select the
Custom format and type in something like the following:

0;0;-

The first format is for positive numbers, the second for negative numbers
and the third for zeros.

John Green

wrote in message
oups.com...
I have a spreadsheet where there are several zeros. I would like the
zeros displayed as dashes (-) but would like this to happen without a
VBA function or sub. And, I still need to perform mathematical
operations on the cell value...so while it displays as a dash I would
like it to be recognized as a zero.

Can this be accomplished using the Format features through the
interface? Or am I out of luck and going to have to do this through
VBA?

Thanks for your help,
Eric




[email protected]

Displaying zeros as dashes on a worksheet
 

John Green wrote:
Eric,

This can be done with formatting under Format|Cells|Number. Select

the
Custom format and type in something like the following:

0;0;-

The first format is for positive numbers, the second for negative

numbers
and the third for zeros.

John Green

wrote in message
oups.com...
I have a spreadsheet where there are several zeros. I would like

the
zeros displayed as dashes (-) but would like this to happen without

a
VBA function or sub. And, I still need to perform mathematical
operations on the cell value...so while it displays as a dash I

would
like it to be recognized as a zero.

Can this be accomplished using the Format features through the
interface? Or am I out of luck and going to have to do this

through
VBA?

Thanks for your help,
Eric



Thanks for the replies - this is exactly what I was looking for!
Eric



All times are GMT +1. The time now is 03:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com