ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formula problem (https://www.excelbanter.com/excel-discussion-misc-queries/154293-formula-problem.html)

David

Formula problem
 
I am having problem with a formula and am wondering if anyone can help. I
have a formula (=A1*B1*C1), where C1 does not always have a value however
excel will not simply just calculate A1*B1 how do i get round this?

Toppers

Formula problem
 
I assume if C1 is blank, you get a result of 0?

=IF(C1="",A1*B1,A1*B1*C1)

"David" wrote:

I am having problem with a formula and am wondering if anyone can help. I
have a formula (=A1*B1*C1), where C1 does not always have a value however
excel will not simply just calculate A1*B1 how do i get round this?


bj

Formula problem
 
maybe
=product(A1:C1)
or
=product(A1,B1,C1)
if however C1 could be text or an error indicator
=if(isnumber(A1),A1,1)*if(isnumber(B1),B1,1)*if(is number(C1),C1,1)
will work

"David" wrote:

I am having problem with a formula and am wondering if anyone can help. I
have a formula (=A1*B1*C1), where C1 does not always have a value however
excel will not simply just calculate A1*B1 how do i get round this?


iliace

Formula problem
 
Array-entered (Ctrl+Shift+Enter instead of just Enter):

=PRODUCT(IF(ISNUMBER(A1:C1),A1:C1,1))

Works great for longer ranges, to avoid multiple IF()s. Will omit
boolean values. Will multiply dates stored as number, yielding
potentially wrong results. It will also return 1 if all cells are
blank. To avoid that issue, use this instead to treat any blanks as 0
(also array-entered):

=PRODUCT(IF(ISNUMBER(A1:C1)+ISBLANK(A1:C1),A1:C1,1 ))


On Aug 15, 1:48 pm, bj wrote:
maybe
=product(A1:C1)
or
=product(A1,B1,C1)
if however C1 could be text or an error indicator
=if(isnumber(A1),A1,1)*if(isnumber(B1),B1,1)*if(is number(C1),C1,1)
will work



"David" wrote:
I am having problem with a formula and am wondering if anyone can help. I
have a formula (=A1*B1*C1), where C1 does not always have a value however
excel will not simply just calculate A1*B1 how do i get round this?- Hide quoted text -


- Show quoted text -




Peo Sjoblom

Formula problem
 
Why complicate things? To quote the OP

"where C1 does not always have a value "

It would be pretty easy to assume that it means that C1 is blank thus his
formula returns zero thus BJ's first formula =PRODUCT(A1:C1) works


Nevertheless your formulas do not work

put 2 in A1 and 2 in B1 and leave C1 blank

both formulas return 0 while the OP I am sure expects the result to be 4


--
Regards,

Peo Sjoblom


"iliace" wrote in message
oups.com...
Array-entered (Ctrl+Shift+Enter instead of just Enter):

=PRODUCT(IF(ISNUMBER(A1:C1),A1:C1,1))

Works great for longer ranges, to avoid multiple IF()s. Will omit
boolean values. Will multiply dates stored as number, yielding
potentially wrong results. It will also return 1 if all cells are
blank. To avoid that issue, use this instead to treat any blanks as 0
(also array-entered):

=PRODUCT(IF(ISNUMBER(A1:C1)+ISBLANK(A1:C1),A1:C1,1 ))


On Aug 15, 1:48 pm, bj wrote:
maybe
=product(A1:C1)
or
=product(A1,B1,C1)
if however C1 could be text or an error indicator
=if(isnumber(A1),A1,1)*if(isnumber(B1),B1,1)*if(is number(C1),C1,1)
will work



"David" wrote:
I am having problem with a formula and am wondering if anyone can help.
I
have a formula (=A1*B1*C1), where C1 does not always have a value
however
excel will not simply just calculate A1*B1 how do i get round this?-
Hide quoted text -


- Show quoted text -






Farhad

Formula problem
 
Hi,

=IF(C10,A1*B1*C1,A1*B1)

Thanks,

--
Farhad Hodjat


"Toppers" wrote:

I assume if C1 is blank, you get a result of 0?

=IF(C1="",A1*B1,A1*B1*C1)

"David" wrote:

I am having problem with a formula and am wondering if anyone can help. I
have a formula (=A1*B1*C1), where C1 does not always have a value however
excel will not simply just calculate A1*B1 how do i get round this?



All times are GMT +1. The time now is 08:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com