Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
BBinSimi
 
Posts: n/a
Default IF statement does not work with "=" sign

I have a simple if statement:
=IF(B42=B44,"Balanced","Not Balanced")
B42 and B44 are exactly the same dollar amount but it says "not balanced".
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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Toppers
 
Posts: n/a
Default IF statement does not work with "=" sign

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),"Balanced","Not balanced")

or

If (Round(b42,0)=round((b44,0),"Balanced","Not balanced")

If cents required, multiply by 100.

HTH

"BBinSimi" wrote:

I have a simple if statement:
=IF(B42=B44,"Balanced","Not Balanced")
B42 and B44 are exactly the same dollar amount but it says "not balanced".
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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default IF statement does not work with "=" sign

If a dollar amount, more probably

=If (Round(b42,2)=round((b44,2),"Balanced","Not balanced")


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Toppers" wrote in message
...
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),"Balanced","Not balanced")

or

If (Round(b42,0)=round((b44,0),"Balanced","Not balanced")

If cents required, multiply by 100.

HTH

"BBinSimi" wrote:

I have a simple if statement:
=IF(B42=B44,"Balanced","Not Balanced")
B42 and B44 are exactly the same dollar amount but it says "not

balanced".
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If statement Matt Montagliano Excel Discussion (Misc queries) 1 September 8th 05 08:47 PM
dates and if statement work on one sheet, not on another John Brown Excel Worksheet Functions 3 September 8th 05 12:58 AM
Linking with equals sign doesn't always work marty53 Excel Worksheet Functions 7 August 18th 05 06:44 PM
# sign in a cell Poody Excel Discussion (Misc queries) 3 July 22nd 05 03:32 PM
Work book formulas Jessica Excel Discussion (Misc queries) 1 June 9th 05 10:51 AM


All times are GMT +1. The time now is 02:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"