Dispatch notes can mention a ticket, a bay and a time in the same sentence. Extract the ticket by its format so the bay number stays in the note.

Match the complete ticket token

In A2, enter Move SR-1042 to bay 8 after lunch. In a version of Excel that supports REGEXEXTRACT, use this formula in B2.

=REGEXEXTRACT(A2,"\bSR-[0-9]{4}\b")

Expect SR-1042. The pattern asks for the literal prefix SR- and exactly four digits. The word boundaries keep it from matching the first four digits of a longer ticket number.

A sample notes cell identifies SR-1042 as a ticket and distinguishes the nearby bay number.

Example match. The prefix and four-digit requirement identify the token.

Put near-matches in the review sample

Try SR-10429 as the only candidate. It should produce no match. Then try a note containing SR-1042 and SR-1088. The default result returns the first match. Decide whether that fits the workflow before filling the helper down.

Sample tests compare a valid four-digit ticket, a five-digit lookalike and a note with two tickets.

Example review set. Decide how a note with multiple valid tickets should be handled.

Keep the original notes next to the extracted ID so you can investigate missing or ambiguous tickets.

Microsoft’s REGEXEXTRACT function reference.