ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Equivalence of two sets of data (https://www.excelbanter.com/excel-discussion-misc-queries/83149-equivalence-two-sets-data.html)

vsoler

Equivalence of two sets of data
 
My problem is as follows:

I have one set of integers and zeroes in A1:Z1 (26 cells)
Another set of integers and zeroes is in A2:Z2

I want to compare the first "n" numbers in A1:Z1 with the first "n"
numbers in A2:Z2; such "n" number is in A3 and may vary depending of
the scenario.

The first "n" integers in A1:Z1 contain no duplicates and no zeroes;
the first "n" integers in A2:Z2 may or may not have duplicates or
zeroes.

I need a formula that gives me "1" if the first "n" integers in A1:Z1
are exactly the same as the first "n" integers in A2:Z2, although they
may be in a different order; the formula would give zero in any other
case.

Can it be done by using one single formula?

Thank you for your help


mrice

Equivalence of two sets of data
 

It could certainly be done with a user defined formula which sorted an
array of values from the two columns and compared as many as the value
of n.


--
mrice


------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=532751


Camilo

Equivalence of two sets of data
 
In cell A3... =IF(A1=A2,1,0)
--
Hope this Helps!
Camilo

Objective: To help one person each day!

Feedback is greatly appreciated! Please let me know if I've answered your
question or if my post was helpful to you?


"vsoler" wrote:

My problem is as follows:

I have one set of integers and zeroes in A1:Z1 (26 cells)
Another set of integers and zeroes is in A2:Z2

I want to compare the first "n" numbers in A1:Z1 with the first "n"
numbers in A2:Z2; such "n" number is in A3 and may vary depending of
the scenario.

The first "n" integers in A1:Z1 contain no duplicates and no zeroes;
the first "n" integers in A2:Z2 may or may not have duplicates or
zeroes.

I need a formula that gives me "1" if the first "n" integers in A1:Z1
are exactly the same as the first "n" integers in A2:Z2, although they
may be in a different order; the formula would give zero in any other
case.

Can it be done by using one single formula?

Thank you for your help



vsoler

Equivalence of two sets of data
 
I'll give you an example

A B C D
1 2 4 1 5 0...
2 5 1 2 4 0...
3 4

That is, if the 4 non repeated integers appear again in the second row,
then the function should return "1"

A B C D
1 2 4 1 5 0...
2 5 1 2 1 0...
3 4

In this case, the function should return "0" because not all the non
repeated integers appear just once in row #2.

I hope you can help


Morrigan

Equivalence of two sets of data
 

Not sure what you want exactly, see attachment. Good luck.


+-------------------------------------------------------------------+
|Filename: Match.zip |
|Download: http://www.excelforum.com/attachment.php?postid=4652 |
+-------------------------------------------------------------------+

--
Morrigan
------------------------------------------------------------------------
Morrigan's Profile: http://www.excelforum.com/member.php...fo&userid=7094
View this thread: http://www.excelforum.com/showthread...hreadid=532751



All times are GMT +1. The time now is 12:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com