Using IF function

Copper Contributor

Mac OS Big Sur 11.2.3. Excel version 16.48

 

Sounds simple really, but cannot get correct answer. One of the cells in the IF function contains a formula. How can you indicate to use the Value of the cell. 

Example

Column O.                                     Column R                                Column S

contains a SUM formula                Contains a $ amount             =IF(O2=R2,"PdFull","PymtOwed")

 

2 Replies

@oregonsue That formula should work just fine, as Excel compares the result of the formula to the value in the other cell. Could it be that the formula in O2 results in a number that has more or different decimals that the amount in R2, and that both numbers are just formatted to display, for instance 2 decimals? Try entering in an empty cell =O2=R2 . What do you get? In case it is FALSE, then the two numbers are not exactly the same and your formula will return "PmtOwed". Is that what's happening?

If so, you perhaps need add ROUND to the sum formula. But without seeing it and the exact (unrounded) result and the exact amount in R2, it's difficult to give you the correct solution. 

Change the SUM formula to something like this:

=ROUND(SUM(<range>),2)

 or change the IF formula to:

=IF(ROUND(O2,2)=R2,"PdFull","PymtOwed")

 Both assume you want 2 decimals.

@oregonsue Thank you for your help. I had reformatted every cell involved to the same formatting. Just never corrected. So redid the 2 columns and error disappeared.