Format of a Conditional Format IF statement?

Magnatolia

Board Regular
Joined
Jan 19, 2012
Messages
79
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!
 

Some videos you may like

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
54,405
Office Version
  1. 365
Platform
  1. Windows
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)
 

Watch MrExcel Video

Forum statistics

Threads
1,108,502
Messages
5,523,295
Members
409,508
Latest member
Afc

This Week's Hot Topics

Top