Multiple Matches

R

Ron St Jean

How do I look up or match from the same table in the same cell. Not sure how
to explain so here is the formula I am trying to use but it gives me an error.
=MATCH($D2,CA2:CA38,0),MATCH($E2,CA2:CA38,0)
$D2 and $E2 are dates and I am trying to match them to a calendar I built.
I would like the cell to display a 1 if one of the arguements are true and a
0 if both of them are false. Any suggestions?
 
L

Luke M

This should work:

=IF(OR(ISERROR(MATCH($D2,CA2:CA38,0)),ISERROR(MATCH($E2,CA2:CA38,0))),0,1)
 
J

John C

You could even do shorten my formula from
=OR((COUNTIF(CA2:CA38,$D2))+(COUNTIF(CA2:CA38,$E2)))*1
to
=MAX(1,COUNTIF(CA2:CA38,$D2),COUNTIF(CA2:CA38,$E2))
 
R

Ron St Jean

Thanks for the help, but it returns a 1 in every cell. I am going to play
with it some more.
 
J

John C

My sample data, I put 2 dates in cells D2 and E2, and if either of those
dates occurred anywhere in the range of CA2:CA38 then it would return a 1,
otherwise it would return a 0. Is this what you wanted? When neither the date
in E2 or D2 were anywhere in the range, it returned a 0.

Perhaps you need to clarify more, what data you have, what is in D2 and E2,
what results you are getting, and what you expect to get.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Multiple IF statement not working 5
Comparing 2 cells using vlookup 4
if formula 6
Matching Columns - very complex 4
vlookup useful? 2
Remove false from formula response in cell 2
Vlookup 3
if(isna(match formula 8

Top