Back to Class Index
MID(S, N1, N2)This function returns the string of length N2 that starts at position N1 in string S. N1 is the number of characters from the beginning of the string, must be greater than or equal to zero, and less than the length of S. N2 must be greater than or equal to zero. If N1+N2 is greater than the length of S, then the substring starting at position N1 in S is returned. The first character in string S is in position zero. Parameters S A string value N1 A numeric value N2 A numeric value Examples T5 = "Spreadsheet" MID(T5, 6, 5) = "sheet" MID(T5, 10, 1) = "t" MID(T5, 1, 0) = " " |