Excel Formula to Find Matching Variations of a String - Excel 2016

Johnny Thunder

Well-known Member
Joined
Apr 9, 2010
Messages
693
Office Version
  1. 2016
Platform
  1. 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.

Unique KeyVariation 1Variation 2
Key 12000-80061000-5000
Key 25000-30008006-2000
Key 11001-50008006-2000
No Match Found1111-44443231-5000
Key 23000-14143000-5000

<tbody>
</tbody>
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Forum statistics

Threads
1,214,942
Messages
6,122,367
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top