#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Multiple Matches

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?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Multiple Matches

This should work:

=IF(OR(ISERROR(MATCH($D2,CA2:CA38,0)),ISERROR(MATC H($E2,CA2:CA38,0))),0,1)
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Ron St Jean" wrote:

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?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Multiple Matches

=OR((COUNTIF(CA2:CA38,$D2))+(COUNTIF(CA2:CA38,$E2) ))*1
--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"Ron St Jean" wrote:

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?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Multiple Matches

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) )
--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"John C" wrote:

=OR((COUNTIF(CA2:CA38,$D2))+(COUNTIF(CA2:CA38,$E2) ))*1
--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"Ron St Jean" wrote:

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?

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Multiple Matches

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

"John C" wrote:

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) )
--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"John C" wrote:

=OR((COUNTIF(CA2:CA38,$D2))+(COUNTIF(CA2:CA38,$E2) ))*1
--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"Ron St Jean" wrote:

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?



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Multiple Matches

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.
--
** John C **

"Ron St Jean" wrote:

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

"John C" wrote:

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) )
--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"John C" wrote:

=OR((COUNTIF(CA2:CA38,$D2))+(COUNTIF(CA2:CA38,$E2) ))*1
--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"Ron St Jean" wrote:

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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sum Multiple Matches Mart Excel Worksheet Functions 5 June 24th 09 10:06 AM
Returning Multiple Matches Adam Hodge Excel Worksheet Functions 4 November 13th 08 04:09 PM
Displaying multiple matches mcilwrk Excel Worksheet Functions 7 February 5th 07 05:53 PM
Multiple Matches Carl Excel Worksheet Functions 3 October 3rd 06 02:41 PM
Multiple matches using LOOKUP Sonya795 Excel Discussion (Misc queries) 1 August 10th 05 06:13 PM


All times are GMT +1. The time now is 05:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"