A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Formula Help



 
 
Thread Tools Display Modes
  #1  
Old April 28th, 2010, 07:50 PM posted to microsoft.public.excel.worksheet.functions
Rebecca
external usenet poster
 
Posts: 284
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  
Old April 28th, 2010, 08:09 PM posted to microsoft.public.excel.worksheet.functions
Joe User[_2_]
external usenet poster
 
Posts: 757
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  
Old April 28th, 2010, 08:53 PM posted to microsoft.public.excel.worksheet.functions
Rebecca
external usenet poster
 
Posts: 284
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  
Old April 28th, 2010, 09:15 PM posted to microsoft.public.excel.worksheet.functions
Joe User[_2_]
external usenet poster
 
Posts: 757
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.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:55 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.