#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
phuser
 
Posts: n/a
Default IF Statement



=IF(SUM(G7-M7)0,SUM(G7-M7)," ")

I love how this keeps the cells clean BUT because there is no value in the
cell, I cant calculate any further,
all I get in return is a #Value
Is it possible to use 2 or more cells like this in a calulation? and if so
what syntax would I use?





  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Toppers
 
Posts: n/a
Default IF Statement

Can you explain why you can't calculate further (cecause of the ""?) and what
exactly you want to do?

"phuser" wrote:



=IF(SUM(G7-M7)0,SUM(G7-M7)," ")

I love how this keeps the cells clean BUT because there is no value in the
cell, I cant calculate any further,
all I get in return is a #Value
Is it possible to use 2 or more cells like this in a calulation? and if so
what syntax would I use?






  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
MyVeryOwnSelf
 
Posts: n/a
Default IF Statement

=IF(SUM(G7-M7)0,SUM(G7-M7)," ")

I love how this keeps the cells clean BUT because there is no value in
the cell, I cant calculate any further,
all I get in return is a #Value
Is it possible to use 2 or more cells like this in a calculation? and
if so what syntax would I use?



One way is to use
Tools Options View
and uncheck "zero values." This means, "if a value is zero, display it as
empty." Then you can use the simple formula like
=MAX(G7-M7,0)
and do further arithmetic on the result, while keeping the cells looking
clean.



A different way is to use the "N" function.

Suppose A1 contains: =IF(G7M7,G7-M7," ")
and A2 contains: =IF(H7N7,H7-N7," ")
(your formula but a bit shorter).

Then a formula such as
=N(A1)+N(A2)
Treats A1 or A2 as zero in the troublesome cases.

Excel's built-in Help explains what "N" does.
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
appending and IF statement to an existing IF statement spence Excel Worksheet Functions 1 February 28th 06 11:00 PM
SET statement tutorial Daminc Excel Discussion (Misc queries) 13 January 17th 06 04:47 PM
If Statement? John Excel Discussion (Misc queries) 1 January 16th 06 03:47 AM
If statement Matt Montagliano Excel Discussion (Misc queries) 1 September 8th 05 08:47 PM
Do I need a sumif or sum of a vlookup formula? PeterB Excel Worksheet Functions 0 June 1st 05 12:23 PM


All times are GMT +1. The time now is 12:07 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"