Urgent help needed: IF function

T

Terence

Dear all,

I need help on the following problem urgently:

In my worsheet:

Cell(K,38) = 2
Cell(C,107) = 0.8
Cell(C,108) = 280000

In Cell(K,108), I have a formula:
K38*$C108*$C$107

The the value of Cell(K,108) is 448000

Now I have the change the formula on Cell(K,108). It
should reference to it's cell to the left, i.e. Cell
(J,108). If Cell(J,108)=0, then I have to multiply the
original formula by 0.5, i.e. (K38*$C108*$C$107) * 0.5,
otherwise, it keeps the original formula K38*$C108*$C$107.
But the cells doesn't come out with the result, it
displays the formula instead: "=IF
(J108=0,"K38*$C108*$C$107","0.5*(K38*$C108*$C$107) ")"

Why does this happen? Can anyone help? Thanks in advance!!

Terence
 
T

tjtjjtjt

Try Pressing Ctrl+` (the button usually directly below Esc)--you may be
displaying Formulas instead of Formula results. That should switch it back to
showing formula results.

But, if I read your post correctly, it sounds like you are really looking
for this:

=IF(J108=0,(K38*$C108*$C$107)*0.5,K38*$C108*$C$107)

If all those quotation marks are really in your formula, that is probably
the problem. Anything displayed within " " displays literally in the cell.

tj
 
M

Myrna Larson

Be sure the cell that is misbehaving is not formatted as text. If it is,
Edit/Clear/Formats. You may also need to re-enter the formula.
 
M

Max

But the cells doesn't come out with the result, it
displays the formula instead: "=IF
(J108=0,"K38*$C108*$C$107","0.5*(K38*$C108*$C$107) ")"

One guess is that K108 is formatted as Text

Try this:
Select K108
click Format > Cells > General > OK
Then click inside the formula bar and press ENTER
(to re-enter the formula)

K108 should compute properly now

But .. if I've read your intent correctly, perhaps
you might also want to change the formula in K108 to:
=IF(J108=0,K38*$C108*$C$107*0.5,K38*$C108*$C$107)

(with the value_if_TRUE/FALSE switched around)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top