ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   calculating values in cells (https://www.excelbanter.com/excel-programming/347956-calculating-values-cells.html)

Antonov

calculating values in cells
 
A1 and C1 may or not have a value (A1 and C1, or A1, or C1).
F1=((A1+C1)*0.2) (still only A1 can have a value or only C1 or both).
How can I write this formula?
thanks



Stefi

calculating values in cells
 
As for the logic:
=OR(AND(A1,C1),OR(AND(A1,NOT(C1)),AND(NOT(A1),C1)) )
This formula returns TRUE if only A1 has a TRUE value or only C1 or both.

But it isn't clear, what should the formula in F1 return if A1 and C1 don't
meet your criteria?

Regards,
Stefi

€˛antonov€¯ ezt Ć*rta:

A1 and C1 may or not have a value (A1 and C1, or A1, or C1).
F1=((A1+C1)*0.2) (still only A1 can have a value or only C1 or both).
How can I write this formula?
thanks




Antonov

calculating values in cells
 
Stefi,
if both A1 and C1 are empty then F1 = 0
if either 0 then F1=(A1+C1)*0.2
"antonov" wrote in message
...
A1 and C1 may or not have a value (A1 and C1, or A1, or C1).
F1=((A1+C1)*0.2) (still only A1 can have a value or only C1 or both).
How can I write this formula?
thanks




Stefi

calculating values in cells
 
Forget what I said, simply write =(A1+C1)*0.2 in F1, Excel will calculate as
follows:

A C F
0 0 0
0 1 0,2
1 0 0,2
1 1 0,4

Regards,
Stefi

€˛antonov€¯ ezt Ć*rta:

Stefi,
if both A1 and C1 are empty then F1 = 0
if either 0 then F1=(A1+C1)*0.2
"antonov" wrote in message
...
A1 and C1 may or not have a value (A1 and C1, or A1, or C1).
F1=((A1+C1)*0.2) (still only A1 can have a value or only C1 or both).
How can I write this formula?
thanks






All times are GMT +1. The time now is 07:45 PM.

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