ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   View Zeros (https://www.excelbanter.com/excel-programming/329387-view-zeros.html)

Teresa

View Zeros
 
In my spreadsheet I have unticke the "View Zeros" option but I need all
values in column O and row K to show zeros, I need a macro to condition
this for these
particular cells

Thanks

Alok

View Zeros
 
Use a custom format of
0
if you want to show whole numbers but 0 when you type a zero.

Use a custom format of
0.00 if you want to show 0 as 0.00 and other numbers as 2.54 etc.

Alok Joshi

"teresa" wrote:

In my spreadsheet I have unticke the "View Zeros" option but I need all
values in column O and row K to show zeros, I need a macro to condition
this for these
particular cells

Thanks


Bob Phillips[_6_]

View Zeros
 
Hi Teresa,

Here is some code

Dim cell As Range

For Each cell In ActiveSheet.UsedRange
If cell.Value = 0 And cell.Column < 11 And cell.Column < 15 Then
cell.Font.Color = RGB(&HFF, &HFF, &HFF)
End If
Next cell


--

HTH

RP
(remove nothere from the email address if mailing direct)


"teresa" wrote in message
...
In my spreadsheet I have unticke the "View Zeros" option but I need all
values in column O and row K to show zeros, I need a macro to condition
this for these
particular cells

Thanks




Teresa

View Zeros
 
Sorry, tried this and dont think it worked,
in cell A7 for example I have sum(c9:h9) which equals zero,
however as I have unticked "View Zeros" ther is a blank here, however
I want it to show zero without ticking "View Zeros" option

Thanks

"Alok" wrote:

Use a custom format of
0
if you want to show whole numbers but 0 when you type a zero.

Use a custom format of
0.00 if you want to show 0 as 0.00 and other numbers as 2.54 etc.

Alok Joshi

"teresa" wrote:

In my spreadsheet I have unticke the "View Zeros" option but I need all
values in column O and row K to show zeros, I need a macro to condition
this for these
particular cells

Thanks


Dave Peterson[_5_]

View Zeros
 
Once you've hidden the 0's, I don't think you'll be able to make them appear --
even with a macro.

I think I'd take the opposite approach. Show all the 0's (check View Zeros).

But then hide the 0's you don't want to see--either using format|conditional
formatting (white on white) or by using a custom number format:

General;-General;;

ps. What do you mean by column 0 and row K?

teresa wrote:

In my spreadsheet I have unticke the "View Zeros" option but I need all
values in column O and row K to show zeros, I need a macro to condition
this for these
particular cells

Thanks


--

Dave Peterson

Tom Ogilvy

View Zeros
 
This works for your stated conditions?

--
Regards,
Tom Ogilvy



"teresa" wrote in message
...
Great Bob - thanks



"Bob Phillips" wrote:

Hi Teresa,

Here is some code

Dim cell As Range

For Each cell In ActiveSheet.UsedRange
If cell.Value = 0 And cell.Column < 11 And cell.Column < 15

Then
cell.Font.Color = RGB(&HFF, &HFF, &HFF)
End If
Next cell


--

HTH

RP
(remove nothere from the email address if mailing direct)


"teresa" wrote in message
...
In my spreadsheet I have unticke the "View Zeros" option but I need

all
values in column O and row K to show zeros, I need a macro to

condition
this for these
particular cells

Thanks








All times are GMT +1. The time now is 12:31 AM.

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