Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 69
Default How to match or look up more than two same data

Hi,
I facing one problem about match or look up more than two same data.
Example:

a b z
c d z
e f z
a c z
a b z

if I want the result show "Yes" or just a remark in "z" when "a" and "b"
appear two times or more. "c" and "d" , "e" and "f" , "a" and "c" show "No"
or other remark.

I know Vlookup function is only can look up one data.
Please help me solve this problem.
Thank you
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default How to match or look up more than two same data

=IF(COUNTIF(A1:B1,"a")+COUNTIF(A1:B1,"b")=2,"yes", "no")
or
=IF(SUMPRODUCT(--(A1:B1={"a";"b"}))=2,"Yes","No")
best wishes
--
Bernard Liengme
Microsoft Excel MVP
people.stfx.ca/bliengme
email address: remove uppercase characters

"Nelson" wrote in message
...
Hi,
I facing one problem about match or look up more than two same data.
Example:

a b z
c d z
e f z
a c z
a b z

if I want the result show "Yes" or just a remark in "z" when "a" and "b"
appear two times or more. "c" and "d" , "e" and "f" , "a" and "c" show
"No"
or other remark.

I know Vlookup function is only can look up one data.
Please help me solve this problem.
Thank you


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 747
Default How to match or look up more than two same data


Col A has a,c,e,a,a
Col B has b,d,f,c,b

Col C -( helping column ) =A1&B1 and drag it down.

in Col D put this formula =IF(COUNTIF($C$1:$C$5,$C$1:$C$5)
=2,"yes","no") and drag it down




On Nov 22, 10:32*pm, Nelson wrote:
Hi,
I facing one problem about match or look up more than two same data.
Example:

a * b * z
c * d * z
e * f * z
a * c * z
a * b * z

if I want the result show "Yes" or just a remark in "z" when "a" and "b"
appear two times or more. "c" and "d" , "e" and "f" , "a" and "c" *show "No"
or other remark.

I know Vlookup function is only can look up one data.
Please help me solve this problem.
Thank you


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 913
Default How to match or look up more than two same data

On Sat, 22 Nov 2008 09:32:00 -0800, Nelson
wrote:

Hi,
I facing one problem about match or look up more than two same data.
Example:

a b z
c d z
e f z
a c z
a b z

if I want the result show "Yes" or just a remark in "z" when "a" and "b"
appear two times or more. "c" and "d" , "e" and "f" , "a" and "c" show "No"
or other remark.

I know Vlookup function is only can look up one data.
Please help me solve this problem.
Thank you



Try this forumula in cell C1:

=IF(SUMPRODUCT((A$:A$5=A1)*(B$1:B$5=B1))1,"Yes"," No")

Copy it down for as many rows that you have data.

Hope this helps / Lars-Åke
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 913
Default How to match or look up more than two same data

On Sat, 22 Nov 2008 18:53:51 GMT, Lars-Åke Aspelin
wrote:

On Sat, 22 Nov 2008 09:32:00 -0800, Nelson
wrote:

Hi,
I facing one problem about match or look up more than two same data.
Example:

a b z
c d z
e f z
a c z
a b z

if I want the result show "Yes" or just a remark in "z" when "a" and "b"
appear two times or more. "c" and "d" , "e" and "f" , "a" and "c" show "No"
or other remark.

I know Vlookup function is only can look up one data.
Please help me solve this problem.
Thank you



Try this forumula in cell C1:

=IF(SUMPRODUCT((A$:A$5=A1)*(B$1:B$5=B1))1,"Yes", "No")

Copy it down for as many rows that you have data.

Hope this helps / Lars-Åke


Sorry, there was a missing 1 in the formula.

=IF(SUMPRODUCT((A$1:A$5=A1)*(B$1:B$5=B1))1,"Yes", "No")

And change the 5's to suit the number of data rows that you have

/ Lars-Åke


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default How to match or look up more than two same data

Hi,

This question is unclear. How can a or b appear 2 or MORE than 2 times?
Your example only shows two columns? Is there more to this question? You
title also says "More than 2"

If the answers you have recieved solve your problem then here is a shorter
version:

=IF(SUM(COUNTIF(A1:B1,{"a","b"}))1,"Yes","No")

If this helps, please click the Yes button

Cheers,
Shane Devenshire

"Nelson" wrote:

Hi,
I facing one problem about match or look up more than two same data.
Example:

a b z
c d z
e f z
a c z
a b z

if I want the result show "Yes" or just a remark in "z" when "a" and "b"
appear two times or more. "c" and "d" , "e" and "f" , "a" and "c" show "No"
or other remark.

I know Vlookup function is only can look up one data.
Please help me solve this problem.
Thank you

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 69
Default How to match or look up more than two same data

Thanks all of you.
I already slove the problem.
Thanks for your help.
:)
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
Cross match data in Col A v/s Col B and display match in Col 3 aquaflow Excel Discussion (Misc queries) 3 July 10th 08 05:07 PM
Match data in 2 columns and return data from 3rd column gwtreece[_2_] Excel Worksheet Functions 1 April 4th 07 03:27 PM
Find, Match data and paste data between two workbooks Chuckak Excel Discussion (Misc queries) 0 September 1st 06 06:59 PM
index,match,match on un-sorted data Brisbane Rob Excel Worksheet Functions 3 September 24th 05 10:04 PM
The match and lookup functions can find literal data but not the same data referenced from a cell Jeff Melvaine Excel Discussion (Misc queries) 3 April 30th 05 01:29 PM


All times are GMT +1. The time now is 03:06 AM.

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"