MrExcel Publishing
Your One Stop for Excel Tips & Solutions

"IF" formula


Posted by Greg on December 05, 2001 11:53 AM

Is it possible to have a formula as the true or false value in an IF formula? What I want to do:

If the value in an adjacent cell is greater than or equals 12, then subtract 12 from that value and add the contents of another cell. If the value is less than 12, then add to that number the contents of another cell.

This doesn't work:
=(IF (C18>12, C12-12+D13, C18+D13))

Thanks!


Posted by Ben on December 05, 2001 11:59 AM

Your formula looks correct to me. I'm wondering why you're using C12 in the second argument instead of C18. Is it possible this is the cell you're trying to enter the formula in and you're getting a circular reference error?

What specifically is the error you're getting?

Posted by Tom Urtis on December 05, 2001 12:25 PM

Try this

As with Ben, I also do not understand why you have C12 in your formula, but try this formula instead, assuming C12 is a typo:

'=IF(C18>=12,C18-12+D13,C18+D13)