Create a conditional formula that results in another calculati
Thanks again.
"T. Valko" wrote:
If *neither* cell contains a number then the formula returns a blank. The ""
is the syntax for "blank". If you'd rather have a 0 returned:
=IF(COUNT(A2),A2/4.54,IF(COUNT(B2),B2*0.83,0))
Or, you could return an informational message like "no value entered":
=IF(COUNT(A2),A2/4.54,IF(COUNT(B2),B2*0.83,"no value entered"))
Using the COUNT function ensures that a number has been entered in one or
the other cells. It prevents errors if someone accidentally enters a text
string or if one of the cells already contains an error. It may not be
necessary but it makes things robust and doesn't add undue complexity to the
formula.
--
Biff
Microsoft Excel MVP
"dyrret" wrote in message
...
One question re the answer: I understand what is being "said" except the
double quotation marks.
"T. Valko" wrote:
Try this:
=IF(COUNT(A2),A2/4.54,IF(COUNT(B2),B2*0.83,""))
--
Biff
Microsoft Excel MVP
"dyrret" wrote in message
...
I'm just learning to use Excel.
I want to enter data in either column A (litres) OR column B (US
gallons).
Column C will convert to imperial gallons.
I would like to create a formula in column C that would result in this
logic:
IF there is data in cell "A(n)" then do calculation A(n)/4.54, if no
data
in A(n) and there is data in cell "B(n)" then do calculation B(n)*.83
|