![]() |
if statement does not work with = sign
I am trying to use this function:
If(b44=b46, "Balance","Not balance"). b44 and b46 are exactly the same dollar value. Both cells are formatted for currency. The cell that the text is written is formatted as general. Both b44 and b46 are calculated cells that add a column of numbers. Have tried using sum statement instead of b44,46 etc. In the watch window both values are the same, but the b44=b46 statement is false. Thanks for your help. Bill |
if statement does not work with = sign
Bill,
Excel, like nearly all computer programs, use what is called "double-precision floating point numbers", which are limited to 15 digits of precision. Cells that appear equal may differ by some very small amount, the error introduced by rounding. See www.cpearson.com/excel/rounding.htm for more details. You could write your formula like =IF(ABS(B44-B46)<0.00000001,"Balance","Not Balance") -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "BBinSimi" wrote in message ... I am trying to use this function: If(b44=b46, "Balance","Not balance"). b44 and b46 are exactly the same dollar value. Both cells are formatted for currency. The cell that the text is written is formatted as general. Both b44 and b46 are calculated cells that add a column of numbers. Have tried using sum statement instead of b44,46 etc. In the watch window both values are the same, but the b44=b46 statement is false. Thanks for your help. Bill |
All times are GMT +1. The time now is 04:31 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com