Home » excel » Excel If statements brackets issue

Excel If statements brackets issue

Posted by: admin May 14, 2020 Leave a comment

Questions:

enter image description here

I am trying to create an IF statement in Excel, in order to group some data into 3 distinct variables. For the purpose of this attempt, I simply want to classify words into people names.

Now, the screenshot shows a simplified version of what I am trying to do, as I am unable to post photos of the full data for security reasons.

As the shot shows, the brackets before F7 and after Joe are in red, but am very confused why. Any help would be appreciated.

Thomas

How to&Answers:

You can do it like this:

=IF(ISNUMBER(MATCH(F7,{"Tom","Ed","Joe"},0)),"names","Not names")

Your formula wasn’t correct because you didn’t have logical values in OR() and the red color was due to Excel pair coloring – not because of error.

To make your formula work as is it would look like:

=IF(OR(F7="Tom",F7="Ed",F7="Joe"),"names","Not names")

Answer:

Excel colour codes brackets when in Edit / Enter mode, to make it easier to identify matching pairs.