Home

IF Function

Highlighted
Jimbobmcwalton
Contributor

Hi There, 

 

I am trying to get Excel to show a result of 3 in a cell if 3 different cells contain WORDONE WORDTWO & WORDTHREE

 

Im using  

 

=IF(OR(V4="WORDONE",W4="WORDTWO",X4="WORDTHREE"),3,1)

 

The formula keeps returning a result of 1 no matter if I use AND (or) OR 

 

Any ideas?

4 Replies
Highlighted

Your exact formula returns 3

image.png

but perhaps you need something like

=(V4="WORDONE")+(W4="WORDTWO")+(X4="WORDTHREE")

which returns the number from zero to 3, depends on how many matches. That's if order of words matters, If not, it'll be another formula.

Highlighted
Check the values of V4:X4. None of them might be equal to any of the values specified in the arguments of the OR function.
Highlighted

Thank you - just checked and the WORDTHREE was actually in capitals and the formula was Wordthree which was causing this !

 

 

Highlighted

That doesn't matter, comparison here is not case sensitive. Try

=IF("WORDTHREE"="Wordthree", "Same", "Different")
Related Conversations
Make Share function in Edge more useful
HotCakeX in Discussions on
2 Replies
function talking to table storage
donquijote in Compute on
0 Replies
Calculated column help
gopalaraoa in SharePoint on
1 Replies
Excel If Functions
Mfouad2255 in Excel on
10 Replies
Combining IF and INDEX functions
Hans van Deursen in Windows PowerShell on
2 Replies