Character / Number Sequence

RRatajczyk

New Member
Joined
May 16, 2018
Messages
22
Please Help!

I am looking for a formula that will identify/detect when a part number is identical (a match) in a long list of part numbers and where it is different in the sequence by one character or number. i.e. ABC123456 vs ABC123465

the result would be "True" where this occurs

In other words the part numbers are identical with the exception of one of the characters or numbers is out of sequence (= TRUE)

and the whole long list of part numbers is being evaluated / compared
 
Last edited by a moderator:
My sincere apology. I'm a bit rusty on how to do this. Do I enter B1: {=SUM(COUNTIF($A$6:$A$10, Transpositions(A1)))} into cell B2 in your above example? I have copied and pasted the above into a new Excel worksheet, but am a little confused about the reference to B1 and A1 in the formula you'd provided. I feel bad, because I know your helping me.
 
Upvote 0

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
My sincere apology. I'm a bit rusty on how to do this. Do I enter B1: {=SUM(COUNTIF($A$6:$A$10, Transpositions(A1)))} into cell B2 in your above example? I have copied and pasted the above into a new Excel worksheet, but am a little confused about the reference to B1 and A1 in the formula you'd provided. I feel bad, because I know your helping me.
You put this in the Formula Bar...

=SUM(COUNTIF($A$6:$A$10, Transpositions(A1)))

and then commit it using CTRL+SHIFT+ENTER... Excel will add the curly braces afterward.
 
Upvote 0
Or =SUMPRODUCT(COUNTIF($A$6:$A$10, Transpositions(A1))) entered the usual way -- should have suggested that initially.
 
Upvote 0
ok. I am not sure if this is the expected result I was looking for. I was trying to identify the part numbers in a list of parts that were identical with the exception of a couple of characters or numbers being transposed. i.e. ABC123456, ABC123465. In this example they match however, the last two characters/numbers are transposed.
 
Upvote 0
it may even be something like this ABC123456; ABC623451. In this example the characters/numbers are all the same however, the 1 and 6 are in a different sequence.
 
Upvote 0
You're welcome.

BTW, the second version is slightly faster (5%) than the first.
 
Upvote 0

Forum statistics

Threads
1,216,101
Messages
6,128,843
Members
449,471
Latest member
lachbee

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