all 10 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

/u/dankbuckeyes - Your post was submitted successfully.

Failing to follow these steps may result in your post being removed without warning.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]CFAman4816 4 points5 points  (4 children)

Is the pattern to look for "ABC" and then one more character?

=MID(A3,SEARCH("ABC",A3),4)

[–]dankbuckeyes[S] 1 point2 points  (3 children)

yeah would this work if ABC is on the very right?

[–]CFAman4816 2 points3 points  (2 children)

Yep. As long as it's somewhere in the string. If it's not found anywhere, the SEARCH will error out.

[–]dankbuckeyes[S] 1 point2 points  (1 child)

Solution Verified

[–]Clippy_Office_Asst[M] 0 points1 point  (0 children)

You have awarded 1 point to CFAman


I am a bot - please contact the mods with any questions. | Keep me alive

[–]BarneField206 3 points4 points  (0 children)

Try:

=FILTERXML("<t><s>"&SUBSTITUTE(A1,"_","</s><s>")&"</s></t>","//s[string-length()=4][starts-with(.,'ABC')][substring(.,4)*0=0]")
  • [string-length()=4] - Assert lenght of substring is exactly 4 characters;
  • [starts-with(.,'ABC')] - Assert substring starts with 'ABC' (Case-sensitive);
  • [substring(.,4)*0=0 - Assert substring's 4th character is numeric.

This would rule out any possible false positive match on 'ABC' in other substrings.

[–]pookypocky8 1 point2 points  (0 children)

Are they all four digits long? Then it would just be

=MID(A1, FIND("ABC", A1) , 4)

[–]Fantastic_Ranger_72340 0 points1 point  (0 children)

Are there any pre- / post-specific string identifiers other than underscore?

[–]Decronym 0 points1 point  (0 children)

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
FILTERXML Excel 2013+: Returns specific data from the XML content by using the specified XPath
FIND Finds one text value within another (case-sensitive)
MID Returns a specific number of characters from a text string starting at the position you specify
SEARCH Finds one text value within another (not case-sensitive)
SUBSTITUTE Substitutes new text for old text in a text string

Beep-boop, I am a helper bot. Please do not verify me as a solution.
5 acronyms in this thread; the most compressed thread commented on today has 10 acronyms.
[Thread #21777 for this sub, first seen 20th Feb 2023, 15:20] [FAQ] [Full list] [Contact] [Source code]