=IF(A23=2,I4*A21+(I4*D29),0) A23 is 2, I4 is 7700 A21 is 0.0565 and D29 is 0.007. Why do I get a result of 0?
=IF(A23=2,I4*A21+(I4*D29),0) A23 is 2, I4 is 7700 A21 is 0.0565 and D29 is 0.007. Why do I get a result of 0?
Is A23 exactly equal to 2.00000000000, or is it rounded?
Originally Posted by shg
Is the "2" value in cell A23 a number format? Maybe try rewriting the formula with quotation marks (" ") around the 2 in the condition of the IF statement.
Someone may be able to elaborate this better than I can, but you need to have things in the same format when you are comparing them. The "2" was probably in Text format. Even when I convert the format to Number, I still have this problem sometimes. I find that adding quotation marks usually fixes the problem.
test A23 using =isnumber(A23) if you get FALSE back, it is text that just looks like a number.
Where does the answer in A23 come from? Is it from a formula - perhaps with =left/right/mid() somewhere in there? (these all return text for an answer)
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks