Match LEFT Characters in column

Utradeshow

Well-known Member
Joined
Apr 26, 2004
Messages
802
Office Version
  1. 365
I have a column that contain serial Numbers. I need to match the ones that the LEFT 14 characters match.

Asset Status Report 06.20.24.xlsx
AB
1YESXOM14287469874
2YESXOM14287469874M
3NOXBO15478715455
4NOXBO15478715451X
Sheet1
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Try this:

Excel Formula:
=BYROW(B1:B4,LAMBDA(a,IF(SUM(--(LEFT(a,14)=LEFT($B$1:$B$4,14)))>1,"YES","NO")))
 
Upvote 0
Another option.
Book1
AB
1YESXOM14287469874
2YESXOM14287469874M
3NOXBO15478715455
4NOXBO15478715451X
5YESXOM14287469874Z5
6NOXOM142874984Z
7YESXBO15478715456
8YESXBO15478715456RT
Sheet1
Cell Formulas
RangeFormula
A1:A8A1=IF(ROWS(FILTER($B$1:$B$8,LEFT(B1,14)=LEFT($B$1:$B$8,14)))>1,"YES","NO")
 
Upvote 0
Another option
Fluff.xlsm
AB
1YesXOM14287469874
2YesXOM14287469874M
3NoXBO15478715455
4NoXBO15478715451X
Data
Cell Formulas
RangeFormula
A1:A4A1=MAP(LEFT(B1:B4,14),LAMBDA(m,IF(COUNTIFS(B:B,m&"*")>1,"Yes","No")))
Dynamic array formulas.
 
Upvote 0
Yet another one (assuming all serial numbers in column B are at least 14-symbol long):
Excel Formula:
=IF(COUNTIFS(B:B,LEFT(B1:B4,14)&"*")>1,"YES","NO")
 
Upvote 0
I may have not stated the example properly, All serials are in Column B and fluctuates, currently there are 40233 rows. so I need the formula to check ALL of column B.
 
Upvote 0
All the formulae suggested will do that. Just change the ranges to suit.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
Is there a way to keep the formula LIGHT on resources?
The column is sorted Ascending, so the formula in A2 would only have to compare B2 and B3? These formulas copied down column A is crashing my computer.
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,318
Members
452,634
Latest member
cpostell

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