#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default POST A QUESTION

Formula is in cell A3 which is =A1+A2. If I don't put any numbers in A1 or A2
cell A3 displays #value! Is there a way to not have the #value! show in cell
A3?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,276
Default POST A QUESTION

Hi,
if you are doing a sum shouldn't give you that result anyway you can use

=if(A1="",A2,if(A2="",A1,A1+A2))


"dwolf" wrote:

Formula is in cell A3 which is =A1+A2. If I don't put any numbers in A1 or A2
cell A3 displays #value! Is there a way to not have the #value! show in cell
A3?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 427
Default POST A QUESTION

Check to see if A1 or A2 is formatted as something other than a
number, or if one of those contains a space or other non-numeric
entry.

Dave O'Brien
Eschew obfuscation
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 905
Default POST A QUESTION

"dwolf" wrote:
Formula is in cell A3 which is =A1+A2.
If I don't put any numbers in A1 or A2
cell A3 displays #value! Is there a way
to not have the #value! show in cell A3?


If A1 and A2 are truly empty, =A1+A2 will result in zero.

So I presume you mean that A1 or A2 __appears__ blank because one or both
have a formula of the form IF(condition,"",something), which is resulting in
a null string.

In that case, =SUM(A1,A2) might be the simplest solution. It also tolerates
other text strings, e.g. " "; that is one or more blanks, which should be
avoided anyway.
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 905
Default POST A QUESTION

PS....

I wrote:
In that case, =SUM(A1,A2) might be the simplest solution.


But that presumes that you want 0 when one or both of A1 and A2 are truly
empty or they have text instead of a number.

If instead you would like the cell with the addition to appear blank unless
and until A1 and A2 have numbers, one of the following formulas should do the
trick, listed in the order of simplest to most robust assumptions about the
contents of A1 and A2.

=if(A1&A2="", "", A1+A2)

=if(TRIM(A1&A2)="", "", A1+A2)

=if(AND(ISNUMBER(A1),ISNUMBER(A2)), A1+A2, "")

=if(AND(ISNUMBER(VALUE(A1)),ISNUMBER(VALUE(A2))), A1+A2, "")


PPS: "Post a Question" was a terrible choice for a subject. In the future,
it would behoove you to choose a subject that is more descriptive of the
problem.


----- original message -----

"Joe User" wrote:
"dwolf" wrote:
Formula is in cell A3 which is =A1+A2.
If I don't put any numbers in A1 or A2
cell A3 displays #value! Is there a way
to not have the #value! show in cell A3?


If A1 and A2 are truly empty, =A1+A2 will result in zero.

So I presume you mean that A1 or A2 __appears__ blank because one or both
have a formula of the form IF(condition,"",something), which is resulting in
a null string.

In that case, =SUM(A1,A2) might be the simplest solution. It also tolerates
other text strings, e.g. " "; that is one or more blanks, which should be
avoided anyway.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 905
Default POST A QUESTION

I wrote a lot of alternatives, namely:
=if(A1&A2="", "", A1+A2)
=if(TRIM(A1&A2)="", "", A1+A2)
=if(AND(ISNUMBER(A1),ISNUMBER(A2)), A1+A2, "")
=if(AND(ISNUMBER(VALUE(A1)),ISNUMBER(VALUE(A2))), A1+A2, "")


Or most simply:

=IF(COUNT(A1,A2)=2, A1+A2, "")


----- original message -----

"Joe User" <joeu2004 wrote in message
...
PS....

I wrote:
In that case, =SUM(A1,A2) might be the simplest solution.


But that presumes that you want 0 when one or both of A1 and A2 are truly
empty or they have text instead of a number.

If instead you would like the cell with the addition to appear blank
unless
and until A1 and A2 have numbers, one of the following formulas should do
the
trick, listed in the order of simplest to most robust assumptions about
the
contents of A1 and A2.

=if(A1&A2="", "", A1+A2)

=if(TRIM(A1&A2)="", "", A1+A2)

=if(AND(ISNUMBER(A1),ISNUMBER(A2)), A1+A2, "")

=if(AND(ISNUMBER(VALUE(A1)),ISNUMBER(VALUE(A2))), A1+A2, "")


PPS: "Post a Question" was a terrible choice for a subject. In the
future,
it would behoove you to choose a subject that is more descriptive of the
problem.


----- original message -----

"Joe User" wrote:
"dwolf" wrote:
Formula is in cell A3 which is =A1+A2.
If I don't put any numbers in A1 or A2
cell A3 displays #value! Is there a way
to not have the #value! show in cell A3?


If A1 and A2 are truly empty, =A1+A2 will result in zero.

So I presume you mean that A1 or A2 __appears__ blank because one or both
have a formula of the form IF(condition,"",something), which is resulting
in
a null string.

In that case, =SUM(A1,A2) might be the simplest solution. It also
tolerates
other text strings, e.g. " "; that is one or more blanks, which should be
avoided anyway.


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
How do I post a question that Needs to show an equation that won't Dan McGarigle New Users to Excel 19 September 10th 09 09:42 AM
get error message when I try to post a question kirk Excel Discussion (Misc queries) 0 July 20th 09 06:32 PM
Why can't I post a question? Nelson B. Excel Discussion (Misc queries) 8 February 11th 09 05:56 PM
General question - editing a post annoni Excel Discussion (Misc queries) 2 June 13th 08 05:04 PM
embarassed to post question Sheaky New Users to Excel 4 April 2nd 06 07:50 PM


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

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"