#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 106
Default Formula Help

I need a formula that will take A1 x B1 but if the number is less then 0 it
will only how up as 0 and if its more then 0 if will show up as the real
number.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 905
Default Formula Help

"Rebecca" wrote:
I need a formula that will take A1 x B1 but if the
number is less then 0 it will only how up as 0 and
if its more then 0 if will show up as the real number.


Try:

=max(0, A1*B1)

PS: For the future, it would be wise to choose a more distinctive subject;
e.g. "Multiply But No Less Than Zero?". By choosing such a non-descript
title, your posting might get lost as a response to other similarly-named
threads in some "news" (aka discussion group) readers.
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 106
Default Formula Help

That worked but now because there is no information in the cells I get a
#Value! error...How do I get rid of this?

"Joe User" wrote:

"Rebecca" wrote:
I need a formula that will take A1 x B1 but if the
number is less then 0 it will only how up as 0 and
if its more then 0 if will show up as the real number.


Try:

=max(0, A1*B1)

PS: For the future, it would be wise to choose a more distinctive subject;
e.g. "Multiply But No Less Than Zero?". By choosing such a non-descript
title, your posting might get lost as a response to other similarly-named
threads in some "news" (aka discussion group) readers.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 905
Default Formula Help

"Rebecca" wrote:
That worked but now because there is no information in
the cells I get a #Value! error...How do I get rid of this?


Take you pick, depending on what you want....

The following requires values in both cells:

=if(count(A1,B1)=2, max(0, A1*B1), "")

The following requires a value in at least one cell:

=if(count(A1,B1), max(0, N(A1)*N(B1)), "")

The following returns zero if there are no values:

=max(0, N(A1)*N(B1))

Caveat: Note that N(A1) returns zero even if A1 is the __text__, not
number, "123". However, if A1 contains text that appears to be a number,
A1*B1 will properly interpret the number. For example, if B1 is 2, A1*B1 is
the __number__ 246. If this behavior of N(A1) is problemmatic, post a
follow-up for alternative solutions, if the first one above does not satisfy
your needs.


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

"Rebecca" wrote:

That worked but now because there is no information in the cells I get a
#Value! error...How do I get rid of this?

"Joe User" wrote:

"Rebecca" wrote:
I need a formula that will take A1 x B1 but if the
number is less then 0 it will only how up as 0 and
if its more then 0 if will show up as the real number.


Try:

=max(0, A1*B1)

PS: For the future, it would be wise to choose a more distinctive subject;
e.g. "Multiply But No Less Than Zero?". By choosing such a non-descript
title, your posting might get lost as a response to other similarly-named
threads in some "news" (aka discussion group) readers.

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



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