#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 318
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default 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


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
when i megre cells that begin with zeros , I lose the zeros RDC Excel Discussion (Misc queries) 1 November 16th 07 03:31 PM
How to turn off Page Layout View as default view Colin Halliday New Users to Excel 3 October 12th 07 02:37 AM
Essbase: Text zeros to number zeros santhu Excel Discussion (Misc queries) 1 March 23rd 07 01:01 PM
How do I view color onscreen (it shows up in print view only) janice Excel Discussion (Misc queries) 1 August 15th 06 07:32 PM
save text field w/ leading zeros in .csv format & not lose zeros? Ques Excel Discussion (Misc queries) 1 May 4th 05 06:21 PM


All times are GMT +1. The time now is 04:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"