I have a simple if statement:
=IF(B42=B44,quot;Balancedquot;,quot;Not Balancedquot;)
B42 and B44 are exactly the same dollar amount but it says quot;not balancedquot;.
Both b42 and b44 are formatted as dollar amounts. The cell in question with
this statement is formatted as 'general'. I tried using other cells etc. I
used a 'watch' window and it stated the values of B42 and B44 as the same.
Thanks
Bill
They may appear the same but if they have been calculated they not match
exactly.
If they are dollar amounts (no cents) try:
If (int(b42)=int(b44),quot;Balancedquot;,quot;Not balancedquot;)
or
If (Round(b42,0)=round((b44,0),quot;Balancedquot;,quot;Not balancedquot;)
If cents required, multiply by 100.
HTH
quot;BBinSimiquot; wrote:
gt; I have a simple if statement:
gt; =IF(B42=B44,quot;Balancedquot;,quot;Not Balancedquot;)
gt; B42 and B44 are exactly the same dollar amount but it says quot;not balancedquot;.
gt; Both b42 and b44 are formatted as dollar amounts. The cell in question with
gt; this statement is formatted as 'general'. I tried using other cells etc. I
gt; used a 'watch' window and it stated the values of B42 and B44 as the same.
gt; Thanks
gt; Bill
If a dollar amount, more probably
=If (Round(b42,2)=round((b44,2),quot;Balancedquot;,quot;Not balancedquot;)--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
quot;Toppersquot; gt; wrote in message
...
gt; They may appear the same but if they have been calculated they not match
gt; exactly.
gt;
gt; If they are dollar amounts (no cents) try:
gt;
gt; If (int(b42)=int(b44),quot;Balancedquot;,quot;Not balancedquot;)
gt;
gt; or
gt;
gt; If (Round(b42,0)=round((b44,0),quot;Balancedquot;,quot;Not balancedquot;)
gt;
gt; If cents required, multiply by 100.
gt;
gt; HTH
gt;
gt; quot;BBinSimiquot; wrote:
gt;
gt; gt; I have a simple if statement:
gt; gt; =IF(B42=B44,quot;Balancedquot;,quot;Not Balancedquot;)
gt; gt; B42 and B44 are exactly the same dollar amount but it says quot;not
balancedquot;.
gt; gt; Both b42 and b44 are formatted as dollar amounts. The cell in question
with
gt; gt; this statement is formatted as 'general'. I tried using other cells etc.
I
gt; gt; used a 'watch' window and it stated the values of B42 and B44 as the
same.
gt; gt; Thanks
gt; gt; Bill
- Nov 03 Mon 2008 20:47
IF statement does not work with quot;=quot; sign
close
全站熱搜
留言列表
發表留言
留言列表

