Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
SEF SEF is offline
external usenet poster
 
Posts: 5
Default Ignore Blank Cells

I update a workbook weekly in separate worksheets. My master worksheet links
to the appropriate cells for the updated data. These are simple percentage
numbers (not forumlas, etc.) and only need to be a one-on-one link. The
problem I have is that if one of the cells is blank, it returns a 0 and I
need to to stay blank. Any ideas? There are about 57,000 cells I am working
with so I really don't want to have to update manually all blanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default Ignore Blank Cells

Hi SEF,

As long as you want to hide all zero values on a sheet you can use in
excel 2003
From the Tools menu select Options
On tab View uncheck Zero Values

If you only would like to hide the zeros from the formula results you
can use conditional format for the result cells.
How this works depends on the excel version you arre using.
Look at the online help.

An other option is to use the number format for those cell with
something like:
#.##0_);[Red](#.##0);[White]0;[Blue]@

HTH,

Wouter

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Ignore Blank Cells

If linking formulas are like =Sheet1!A1 change them to

=IF(Sheet1!A1="","",Sheet1!A1)

Copy down and across.

Or use a macro to change all existing formulas.

Sub ZeroTrapAdd()
Dim mystr As String
Dim cel As Range
For Each cel In ActiveSheet.UsedRange
If cel.HasFormula = True Then
If Not cel.Formula Like "=IF(*" Then
mystr = Right(cel.Formula, Len(cel.Formula) - 1)
cel.Value = "=IF(" & mystr & "="""",""""," & mystr & ")"
End If
End If
Next
End Sub


Gord Dibben MS Excel MVP

On Tue, 27 Apr 2010 10:53:01 -0700, SEF
wrote:

I update a workbook weekly in separate worksheets. My master worksheet links
to the appropriate cells for the updated data. These are simple percentage
numbers (not forumlas, etc.) and only need to be a one-on-one link. The
problem I have is that if one of the cells is blank, it returns a 0 and I
need to to stay blank. Any ideas? There are about 57,000 cells I am working
with so I really don't want to have to update manually all blanks.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Ignore Blank Cells

Probably the simplest way is to go into the display options for Excel 2007
and uncheck the box [Show a zero in cells that have zero value]; it's in the
Excel Options that you access at the bottom of the Office Button menu, In
Excel 2003, it's found in the ToolsOptionsView menu (it's a check box that
says Zero values). If these are NOT checked you shouldn't see the zeroes in
the cells linked to empty cells. You may have to re-open the file for it to
take effect.

HTH
Bill

"SEF" wrote:

I update a workbook weekly in separate worksheets. My master worksheet links
to the appropriate cells for the updated data. These are simple percentage
numbers (not forumlas, etc.) and only need to be a one-on-one link. The
problem I have is that if one of the cells is blank, it returns a 0 and I
need to to stay blank. Any ideas? There are about 57,000 cells I am working
with so I really don't want to have to update manually all blanks.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Ignore Blank Cells

I should probably have mentioned that in 2007, it's under Excel
OptionsAdvancedDisplay options for this worksheet.

Bill

"SEF" wrote:

I update a workbook weekly in separate worksheets. My master worksheet links
to the appropriate cells for the updated data. These are simple percentage
numbers (not forumlas, etc.) and only need to be a one-on-one link. The
problem I have is that if one of the cells is blank, it returns a 0 and I
need to to stay blank. Any ideas? There are about 57,000 cells I am working
with so I really don't want to have to update manually all blanks.



  #6   Report Post  
Posted to microsoft.public.excel.programming
SEF SEF is offline
external usenet poster
 
Posts: 5
Default Ignore Blank Cells

Thank you all - the macro was especially helpful!

"Gord Dibben" wrote:

If linking formulas are like =Sheet1!A1 change them to

=IF(Sheet1!A1="","",Sheet1!A1)

Copy down and across.

Or use a macro to change all existing formulas.

Sub ZeroTrapAdd()
Dim mystr As String
Dim cel As Range
For Each cel In ActiveSheet.UsedRange
If cel.HasFormula = True Then
If Not cel.Formula Like "=IF(*" Then
mystr = Right(cel.Formula, Len(cel.Formula) - 1)
cel.Value = "=IF(" & mystr & "="""",""""," & mystr & ")"
End If
End If
Next
End Sub


Gord Dibben MS Excel MVP

On Tue, 27 Apr 2010 10:53:01 -0700, SEF
wrote:

I update a workbook weekly in separate worksheets. My master worksheet links
to the appropriate cells for the updated data. These are simple percentage
numbers (not forumlas, etc.) and only need to be a one-on-one link. The
problem I have is that if one of the cells is blank, it returns a 0 and I
need to to stay blank. Any ideas? There are about 57,000 cells I am working
with so I really don't want to have to update manually all blanks.


.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Ignore Blank Cells

Thanks for the feedback.

Gord

On Tue, 27 Apr 2010 13:14:01 -0700, SEF
wrote:

Thank you all - the macro was especially helpful!

"Gord Dibben" wrote:

If linking formulas are like =Sheet1!A1 change them to

=IF(Sheet1!A1="","",Sheet1!A1)

Copy down and across.

Or use a macro to change all existing formulas.

Sub ZeroTrapAdd()
Dim mystr As String
Dim cel As Range
For Each cel In ActiveSheet.UsedRange
If cel.HasFormula = True Then
If Not cel.Formula Like "=IF(*" Then
mystr = Right(cel.Formula, Len(cel.Formula) - 1)
cel.Value = "=IF(" & mystr & "="""",""""," & mystr & ")"
End If
End If
Next
End Sub


Gord Dibben MS Excel MVP

On Tue, 27 Apr 2010 10:53:01 -0700, SEF
wrote:

I update a workbook weekly in separate worksheets. My master worksheet links
to the appropriate cells for the updated data. These are simple percentage
numbers (not forumlas, etc.) and only need to be a one-on-one link. The
problem I have is that if one of the cells is blank, it returns a 0 and I
need to to stay blank. Any ideas? There are about 57,000 cells I am working
with so I really don't want to have to update manually all blanks.


.


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
Ignore Blank or 0 cells Dave Excel Worksheet Functions 4 August 20th 08 12:06 AM
Ignore blank cells brownti via OfficeKB.com Excel Programming 6 May 25th 07 04:35 PM
Ignore Blank Cells Benz Excel Programming 3 September 25th 06 08:37 PM
ignore blank cells Leticia Excel Discussion (Misc queries) 3 February 27th 06 05:41 PM
How to ignore blank cells MattBeckwith Charts and Charting in Excel 10 February 19th 06 11:16 PM


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

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

About Us

"It's about Microsoft Excel"