Subtring and remove duplicates form col A

i have excel data here i want to take substring of first 3 digits and remove duplicates here the challange is i have already applied filter on col B
how can we achieve this iam sending sample file
Substring.xlsx (8.5 KB)

HI,

How about clearing filter in advance then doing string manipulation?

Sample
Sample20240619-2.zip (15.6 KB)

Regards,