Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 67
Default Blank and 0's in Cells


I feel like this may be a really dumb question but here goes. I've been
using Excel for several months now to creat various spreadsheets. In order to
avoid formula errors or to end up with 0's on all the unused lines I have
been using If formulas for example:

=IF(L67="",IF(N67="","",-N67),IF(N67="",L67,IF(N67-L67=0,"",L67-N67)))
as you can see I'm doing little more than subtracting one cell from another
but it becomes this big long mess

When I am working on longer formulas it becomes a real pain to then go back
and add all the above in to accomodate cells without a number in them.

Please tell me that there is an easier way to do this??

Thanks in advance,

Kris
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default Blank and 0's in Cells

Note that a blank cell will not produce an error when used in an
arithmetic operation. It will simply count as 0. I.e., if A1 is blank,
the following formula will not produce an error but just give -B1

=A1-B1

By contrast, an explicit empty string literal in a formula WILL cause
the #VALUE! error as in the following:

=""-B1 <<< returns #VALUE!

From your formula attempt I understand that you display "" also if

both numbers are nonzero but equal hence producing a 0. If so, the
following simple formula:

=IF(L67-N67=0,"",L67-N67)

Another thing you can do is simply use

=L67-N67

and then select the cells, FormatConditional Formatting... and set a
white color font.

You can also make 0's appear as blank from ToolsOptionsView Zero
Values but this will hold for the entire sheet.

HTH
Kostis Vezerides

On Jul 12, 9:02 pm, Klee wrote:
I feel like this may be a really dumb question but here goes. I've been
using Excel for several months now to creat various spreadsheets. In order to
avoid formula errors or to end up with 0's on all the unused lines I have
been using If formulas for example:

=IF(L67="",IF(N67="","",-N67),IF(N67="",L67,IF(N67-L67=0,"",L67-N67)))
as you can see I'm doing little more than subtracting one cell from another
but it becomes this big long mess

When I am working on longer formulas it becomes a real pain to then go back
and add all the above in to accomodate cells without a number in them.

Please tell me that there is an easier way to do this??

Thanks in advance,

Kris



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 67
Default Blank and 0's in Cells

This is very helpful, thank you. I especially like the Tools/Options/Zero
Value. I think it will work great. Do you know if there is a way to set it so
that it automatically uses that option every time you open Excel so I don't
have to change each time I open a spreadsheet?

Thanks again, I appreciate it.

"vezerid" wrote:

Note that a blank cell will not produce an error when used in an
arithmetic operation. It will simply count as 0. I.e., if A1 is blank,
the following formula will not produce an error but just give -B1

=A1-B1

By contrast, an explicit empty string literal in a formula WILL cause
the #VALUE! error as in the following:

=""-B1 <<< returns #VALUE!

From your formula attempt I understand that you display "" also if

both numbers are nonzero but equal hence producing a 0. If so, the
following simple formula:

=IF(L67-N67=0,"",L67-N67)

Another thing you can do is simply use

=L67-N67

and then select the cells, FormatConditional Formatting... and set a
white color font.

You can also make 0's appear as blank from ToolsOptionsView Zero
Values but this will hold for the entire sheet.

HTH
Kostis Vezerides

On Jul 12, 9:02 pm, Klee wrote:
I feel like this may be a really dumb question but here goes. I've been
using Excel for several months now to creat various spreadsheets. In order to
avoid formula errors or to end up with 0's on all the unused lines I have
been using If formulas for example:

=IF(L67="",IF(N67="","",-N67),IF(N67="",L67,IF(N67-L67=0,"",L67-N67)))
as you can see I'm doing little more than subtracting one cell from another
but it becomes this big long mess

When I am working on longer formulas it becomes a real pain to then go back
and add all the above in to accomodate cells without a number in them.

Please tell me that there is an easier way to do this??

Thanks in advance,

Kris




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Blank and 0's in Cells

Another alternative is to use a custom number format. Format/Cells/Custom

#,###;(#,###);



"Klee" wrote:


I feel like this may be a really dumb question but here goes. I've been
using Excel for several months now to creat various spreadsheets. In order to
avoid formula errors or to end up with 0's on all the unused lines I have
been using If formulas for example:

=IF(L67="",IF(N67="","",-N67),IF(N67="",L67,IF(N67-L67=0,"",L67-N67)))
as you can see I'm doing little more than subtracting one cell from another
but it becomes this big long mess

When I am working on longer formulas it becomes a real pain to then go back
and add all the above in to accomodate cells without a number in them.

Please tell me that there is an easier way to do this??

Thanks in advance,

Kris

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 67
Default Blank and 0's in Cells

Thank you JMB, this is the coolest thing ever. I put the formula in then made
it my default woorkbook. Now I don't have to do those long nasty formulas for
it anymore. I could just kiss you! You've made my day.

"JMB" wrote:

Another alternative is to use a custom number format. Format/Cells/Custom

#,###;(#,###);



"Klee" wrote:


I feel like this may be a really dumb question but here goes. I've been
using Excel for several months now to creat various spreadsheets. In order to
avoid formula errors or to end up with 0's on all the unused lines I have
been using If formulas for example:

=IF(L67="",IF(N67="","",-N67),IF(N67="",L67,IF(N67-L67=0,"",L67-N67)))
as you can see I'm doing little more than subtracting one cell from another
but it becomes this big long mess

When I am working on longer formulas it becomes a real pain to then go back
and add all the above in to accomodate cells without a number in them.

Please tell me that there is an easier way to do this??

Thanks in advance,

Kris



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Blank and 0's in Cells

You're welcome and thanks for the feedback. There's some more information on
custom number formats he

http://mcgimpsey.com/excel/conditional6.html

Also, see XL help about custom number formats for more info.


"Klee" wrote:

Thank you JMB, this is the coolest thing ever. I put the formula in then made
it my default woorkbook. Now I don't have to do those long nasty formulas for
it anymore. I could just kiss you! You've made my day.

"JMB" wrote:

Another alternative is to use a custom number format. Format/Cells/Custom

#,###;(#,###);



"Klee" wrote:


I feel like this may be a really dumb question but here goes. I've been
using Excel for several months now to creat various spreadsheets. In order to
avoid formula errors or to end up with 0's on all the unused lines I have
been using If formulas for example:

=IF(L67="",IF(N67="","",-N67),IF(N67="",L67,IF(N67-L67=0,"",L67-N67)))
as you can see I'm doing little more than subtracting one cell from another
but it becomes this big long mess

When I am working on longer formulas it becomes a real pain to then go back
and add all the above in to accomodate cells without a number in them.

Please tell me that there is an easier way to do this??

Thanks in advance,

Kris

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
Index/match - make blank cells return a blank value. diaare Excel Worksheet Functions 3 May 3rd 23 03:44 AM
How to count blank cells (Rows) between Non-Blank cells in Col "A" Dennis Excel Discussion (Misc queries) 8 July 20th 06 11:25 PM
Imported Data creates blank cells that aren't really blank JackieD Excel Worksheet Functions 14 February 23rd 06 12:57 AM
HELP: Last row of the column containing blank cells between non-blank cells Space Ape Excel Worksheet Functions 2 May 27th 05 12:18 AM
Making Blank Cells Really Blank (Zen Koan) Ralph Excel Worksheet Functions 2 April 11th 05 12:07 AM


All times are GMT +1. The time now is 10:03 PM.

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"