IF trouble, don't make me TRIM :(

Grammarjunkie

Board Regular
Joined
Mar 22, 2016
Messages
86
Code:
=IF(J22="","",IF(G9="","",IF(D10="","",IF(AND(J22<>G9,G9=D10),"Closing Disclosure Interest Rate does not match Note or ELC Interest Rate",IF(AND(D10<>J22,J22=G9),"ELC interest Rate does not match Closing Disclosure or Note Interest Rate",IF(AND(D10=J22,G9<>D10),"Note Interest Rate does not match Closing Disclosure or ELC Interest Rate",IF(AND(D10<>J22<>G9),"Note Interest Rate, ELC Interest Rate, and Closing Disclosure Interest Rate all do not match","")))))))

This is the code, and the results are pulling that they don't match, even though they all do. I've used =LEN and =isblank, and all three cells (J22, G9, D10) are all blank according to those tests, but for some reason the formula keeps resulting to all three don't match. I did have those cells formatting to percentages (three decimal places). On a whim, I changed them all to general, and it still reads they don't match when they do.
I was testing with 4.562. (In case you want to test in your Excel.)
I typed "test" in each of them as well, and it reads they don't match.

I'm not even done with the above code yet. I have stuff to add. And I really, really don't want to have to TRIM every single thing.

Am I having a blond moment? Is there anything else I can do?
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
That last AND doesn't look right
AND(D10<>J22<>G9)

If you're trying to make that AND say that ALL 3 values are different, then it should be
AND(D10<>J22,D10<>G9,J22<>G9)
 
Upvote 0
That last AND doesn't look right
AND(D10<>J22<>G9)

If you're trying to make that AND say that ALL 3 values are different, then it should be
AND(D10<>J22,D10<>G9,J22<>G9)

Ugh. Dur. I don't know why I made it to the end and then decided to stop doing it the way I had been doing it. :P

Thank you for noticing. I would have gone crazy.
 
Upvote 0

Forum statistics

Threads
1,215,267
Messages
6,123,964
Members
449,137
Latest member
yeti1016

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top