If statement providing incorrect answer

doug firr

Board Regular
Joined
Mar 28, 2011
Messages
140
I've stared at it for ten minutes. I'm not going mad.

In cell K8 is the value (General) 800. In C8 is the value (Also general format) 768.

=IF(C8<=K8,1,2) returns 2 not 1.

What's going on? Anyone encounter this?
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Maybe one of your numbers is text rather than a number (formatting is irrelevant). You can use the ISNUMBER function to check - it returns TRUE for numbers.
 
Upvote 0
So weird. I got it now. Though it was showing as "general" I formatted it as number just to make sure. No difference. Then, I created a new cell =C8*1 and compared to that cell. It works now. Excel being funny
 
Upvote 0

Forum statistics

Threads
1,217,411
Messages
6,136,469
Members
450,015
Latest member
excel_beta_345User

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