Format of a Conditional Format IF statement?

Magnatolia

Board Regular
Joined
Jan 19, 2012
Messages
81
Office Version
  1. 365
Platform
  1. Windows
Hi everyone,

I've acquired a spreadsheet and the conditional formatting is broken and duplicated. Can someone elaborate on what
Code:
=IF(A2=2,5," ")
would do? The output is it highlights yellow when A2 has a numerical value of 2. But I can't figure out what the 5 or space do. The numerical value of 5 in A2 does not trigger this format.

I know how to make it yellow with much simper formula, but want to make sure the other two bits don't do something else.

Thanks!
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
It looks to me like someone just entered the wrong formula. It "works", but has extra junk that doesn't do anything.
If you just want to highlight if A2 is 2, then just use:
=A2=2

If you want to highlight if A2 is 2 or 5, then use:
=OR(A2=2,A2=5)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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