Data Cleaning & Text
Inspect Character Code Sequences & Split a String into Characters (CODE & MID)
Audit 4-character SKU prefixes, currency codes, or short tokens by extracting each character with MID and inspecting its numeric code point with CODE.
Catch lookalike hyphens, spaces, and case mismatches at the character level
Two 4-character prefixes can look nearly identical onscreen while failing exact joins because one uses lowercase letters ("az-9" -> 97-122-45-57) or a non-breaking space (160) instead of standard ASCII ("AZ-9" -> 65-90-45-57).
Slicing individual positions with MID(text, pos, 1) and converting each character with CODE(MID(text, pos, 1)) exposes the exact decimal byte sequence and lets data stewards compute positional checksums.
| Position | MID("AZ-9", pos, 1) | CODE(...) Decimal | Character Class |
|---|---|---|---|
| 1 | A | 65 | Uppercase ASCII (65..90) |
| 2 | Z | 90 | Uppercase ASCII (65..90) |
| 3 | - | 45 | ASCII Hyphen-Minus |
| 4 | 9 | 57 | ASCII Digit (48..57) |
Hyphen-Joined 4-Character Code Point Sequence
Validates that B2 has exactly 4 characters and outputs its decimal code sequence.
=IF(LEN(B2) <> 4, "4-Char Token Required", CODE(MID(B2, 1, 1)) & "-" & CODE(MID(B2, 2, 1)) & "-" & CODE(MID(B2, 3, 1)) & "-" & CODE(MID(B2, 4, 1)))4-Character Code-Point Checksum Total
Sums the four character codes to detect case changes or invisible character substitutions.
=IF(LEN(B2) <> 4, 0, CODE(MID(B2, 1, 1)) + CODE(MID(B2, 2, 1)) + CODE(MID(B2, 3, 1)) + CODE(MID(B2, 4, 1)))Try the example
Use the original values or change them to test your understanding.