ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Fundamental problem with IF statement (https://www.excelbanter.com/excel-worksheet-functions/25770-fundamental-problem-if-statement.html)

David F

Fundamental problem with IF statement
 
I have the following statement in cell E38:
IF(C380,=ROUND(H38/C38,1),0)
The E38 shows the formulas instead of the calculated values (value_if_true
and value_if_false), regardless of whether C38 contains 0, 1 or left blank.
Under any of those C38 values, E38 as stubborn whether I have the '=' before
the ROUND or not and whether I specify the value_if_false (0) or not. H38
also contains a legitimate value.

In the life of me, I could not figure out why this IF statement does not
work.

Any idea?

Thanks,
David





Gary's Student

use ROUND not =ROUND
--
Gary's Student


"David F" wrote:

I have the following statement in cell E38:
IF(C380,=ROUND(H38/C38,1),0)
The E38 shows the formulas instead of the calculated values (value_if_true
and value_if_false), regardless of whether C38 contains 0, 1 or left blank.
Under any of those C38 values, E38 as stubborn whether I have the '=' before
the ROUND or not and whether I specify the value_if_false (0) or not. H38
also contains a legitimate value.

In the life of me, I could not figure out why this IF statement does not
work.

Any idea?

Thanks,
David






JE McGimpsey

Format your cell as General instead of Text. Delete the "=" before
ROUND() and reenter the formula.

In article ,
"David F" wrote:

I have the following statement in cell E38:
IF(C380,=ROUND(H38/C38,1),0)
The E38 shows the formulas instead of the calculated values (value_if_true
and value_if_false), regardless of whether C38 contains 0, 1 or left blank.
Under any of those C38 values, E38 as stubborn whether I have the '=' before
the ROUND or not and whether I specify the value_if_false (0) or not. H38
also contains a legitimate value.

In the life of me, I could not figure out why this IF statement does not
work.


Gary's Student

Also insure that the cell format is not forcing EXCEL to think it's text
--
Gary's Student


"David F" wrote:

I have the following statement in cell E38:
IF(C380,=ROUND(H38/C38,1),0)
The E38 shows the formulas instead of the calculated values (value_if_true
and value_if_false), regardless of whether C38 contains 0, 1 or left blank.
Under any of those C38 values, E38 as stubborn whether I have the '=' before
the ROUND or not and whether I specify the value_if_false (0) or not. H38
also contains a legitimate value.

In the life of me, I could not figure out why this IF statement does not
work.

Any idea?

Thanks,
David






David F

Sorry, it did eventually worked.
Interestingly, I did try first =IF(..., but because it depends on another
cell where I had an 'IF(...' (w/o the '=') it gave me an #VALUE! which I did
not trace so I gave up on the '=IF(...' too early...
FYI, I did not need to reenter the entire statement. It is enough if I just

Thanks again,
David

"Gary's Student" wrote in message
...
Also insure that the cell format is not forcing EXCEL to think it's text
--
Gary's Student


"David F" wrote:

I have the following statement in cell E38:
IF(C380,=ROUND(H38/C38,1),0)
The E38 shows the formulas instead of the calculated values

(value_if_true
and value_if_false), regardless of whether C38 contains 0, 1 or left

blank.
Under any of those C38 values, E38 as stubborn whether I have the '='

before
the ROUND or not and whether I specify the value_if_false (0) or not.

H38
also contains a legitimate value.

In the life of me, I could not figure out why this IF statement does not
work.

Any idea?

Thanks,
David









All times are GMT +1. The time now is 07:04 AM.

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