MID counts character positions from the left of the string starting at 1. The character at start_num is the first included in the result, and num_chars determines how many characters are returned from that position rightward. Spaces, hyphens, and special characters all count as one character. The result is always a text string -- wrap in VALUE if the extracted characters need to be numeric for calculations. When start_num varies by row because a delimiter shifts, use
FIND to locate the delimiter and calculate the start dynamically: FIND returns the position of a character, and adding 1 moves past the delimiter to the first character you want to extract. When both the start and end of the target segment are marked by delimiters, use FIND twice -- once for each delimiter -- to calculate both start_num and num_chars. The
LEFT and
RIGHT functions handle fixed-position extracts from either end of the string and are simpler when the target segment is at the start or end.