I will try to condense this into a general sense. I have an Excel sheet with two different sets of cells that require user input. The first sets has 8 inputs, the second set has 5.
Let's say the Data Sets One and Two have user inputs of letters, like so:
I need to check the two sets for replicated data. However, I only care if any two side-by-side values are repeated, not just single values.
For example, Data Set One contains seven sequential "pairs" of input data:
And similarly, Data Set Two have four additional pairs of data:
I need to see if any of these pairs match. Order does not matter - as long as two pairs have the same two individual inputs, I need to make a decision one way. If the pairs do not contain both matching values , then my decision goes a different way.
So in the above example, I need my code to recognize matches between:
Let's say the Data Sets One and Two have user inputs of letters, like so:
VBA Code:
DataSetOne(0) = A
DataSetOne(1) = B
DataSetOne(2) = C
DataSetOne(3) = D
DataSetOne(4) = E
DataSetOne(5) = F
DataSetOne(6) = G
DataSetOne(7) = H
DataSetTwo(0) = A
DataSetTwo(1) = B
DataSetTwo(2) = H
DataSetTwo(3) = D
DataSetTwo(4) = C
I need to check the two sets for replicated data. However, I only care if any two side-by-side values are repeated, not just single values.
For example, Data Set One contains seven sequential "pairs" of input data:
Code:
Pair 1 = A, B
Pair 2 = B, C
Pair 3 = C, D
Pair 4 = D, E
Pair 5 = E, F
Pair 6 = F, G
Pair 7 = G, H
And similarly, Data Set Two have four additional pairs of data:
Code:
Pair 8 = A, B
Pair 9 = B, H
Pair 10 = H, D
Pair 12 = D, C
I need to see if any of these pairs match. Order does not matter - as long as two pairs have the same two individual inputs, I need to make a decision one way. If the pairs do not contain both matching values , then my decision goes a different way.
So in the above example, I need my code to recognize matches between:
- Pair 1 and Pair 8
- Pair 3 and Pair 12