3

Excel Match Function Hi there , I have this formula

=IFERROR(IF(MATCH(A2,G:G,0)*OR(MATCH(B2,G:G,0)),"Present",),"Absent")

What I want is to return Present if one of the email from Column A and B present in Column G.

The Formula Work with *And but its not working with *OR.

2 Answers 2

3

If there is no match, then Match() will return the #N/A error, which will be multiplied with the other Match() result and still return an error. Therefore, this formula will only have a non-error result if BOTH Match formulas return a proper value. That's not what you want, I assume.

You need a formula or function that does not resolve in an error if there is only one match for the two conditions.

One option is to encase each Match into an Iferror. Anonther option is to use Countif, along the lines of this:

=if(countif(G:G,A2)+countif(G:G,B2),"Present","Absent")

Countif returns 0 if nothing is found or a count of the items found. The zero will equal a FALSE in the IF statement, so if neither Countif finds anything, the FALSE argument of the IF function will fire. Bit if any of the two Countif functions find a match, the result will be a number greater than zero, so the TRUE part of the IF function will fire.

Sign up to request clarification or add additional context in comments.

Comments

1

I made a formula using match and isnumber.

=IF(ISNUMBER(MATCH(A2;G:G;0));"Present";IF(ISNUMBER(MATCH(B2;G:G;0));"Present";"Absent"))

So if match number is value that means there are match in column G so then it will return Present, simple as that.

1 Comment

@Enaya see how the formula uses semicolons? You will need to replace these with commas to work for you. Some regional settings use commas, others use semicolons.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.