Johnny Thunder
Well-known Member
- Joined
- Apr 9, 2010
- Messages
- 693
- Office Version
- 2016
- Platform
- MacOS
Ok Gang, I have a project with a crazy time crunch and was hoping to have some help on the below.
I have a query of data that has a column with my Lookup Value (Variation 1) and a secondary column with an offsetting value that is backwards (Variation 2).
If you look at the data in column Variation1, these are my lookup values, I have only given 2 actual combinations but what I need the Unique key column to do is;
1, give each unique Variation a key so if you look at the first data set, 2000-8006 I have manually given it "key 1", then on the Variation 2 column the data is represented as an offset to Variation 1 but the string will be backwards.
So the formula will need to look row by row as well as looking above itself to ensure it has not already assigned a key# that has already been used.
I've highlighted below the variations that matched from my example, I just can't figure out how to write a statement or VB Code to get this done? Any help is appreciated.
<tbody>
</tbody>
I have a query of data that has a column with my Lookup Value (Variation 1) and a secondary column with an offsetting value that is backwards (Variation 2).
If you look at the data in column Variation1, these are my lookup values, I have only given 2 actual combinations but what I need the Unique key column to do is;
1, give each unique Variation a key so if you look at the first data set, 2000-8006 I have manually given it "key 1", then on the Variation 2 column the data is represented as an offset to Variation 1 but the string will be backwards.
So the formula will need to look row by row as well as looking above itself to ensure it has not already assigned a key# that has already been used.
I've highlighted below the variations that matched from my example, I just can't figure out how to write a statement or VB Code to get this done? Any help is appreciated.
Unique Key | Variation 1 | Variation 2 |
Key 1 | 2000-8006 | 1000-5000 |
Key 2 | 5000-3000 | 8006-2000 |
Key 1 | 1001-5000 | 8006-2000 |
No Match Found | 1111-4444 | 3231-5000 |
Key 2 | 3000-1414 | 3000-5000 |
<tbody>
</tbody>