aliceinthewonderland
New Member
- Joined
- Sep 21, 2021
- Messages
- 3
- Office Version
- 2016
- Platform
- Windows
Hi guys,
I have a set of data that I want to loop each row into the rest of the data, pull out a matching row if it appears in the rest of the data.
Criteria for matching rows: column A-C are identical but column D is different (column d only two choice of input: male, female)
I want to pull out matching pairs into another tab. The output should be an even number of rolls as they should be in pairs. once a matching row is found, the loop should stop as there may be another matching rows below but I only need one match for one row of data so each matching pair only contains 2 row of data.
So for example, first two rows are a pair as they have same group, city, school, class but opposite gender. Thank you guys!
I have a set of data that I want to loop each row into the rest of the data, pull out a matching row if it appears in the rest of the data.
Criteria for matching rows: column A-C are identical but column D is different (column d only two choice of input: male, female)
I want to pull out matching pairs into another tab. The output should be an even number of rolls as they should be in pairs. once a matching row is found, the loop should stop as there may be another matching rows below but I only need one match for one row of data so each matching pair only contains 2 row of data.
So for example, first two rows are a pair as they have same group, city, school, class but opposite gender. Thank you guys!
Group | city | school | class | gender | my goal |
A | city1 | S1 | C1 | Female | include in output, as it is part of a matching pair |
A | city1 | S1 | C1 | Male | include in output, as it is part of a matching pair |
A | city1 | S1 | C1 | Male | not in output |
B | city 2 | S2 | C1 | Male | include in output, as it is part of a matching pair |
B | city 2 | S2 | C1 | Female | include in output, as it is part of a matching pair |
C | city 2 | S2 | C1 | Female | not in output |