VBA Mid Function: The Mid function in VBA returns a substring from within a supplied string.

Syntax

Parameter

Str (required) -This parameter represents a string from which you want to extract the substring.

Start (required) – This parameter represents the substring start position.

Length (optional) – This parameter represents the length of the substring. It returns all characters from the Start position to the end of the string if this argument is omitted.

Return

This function returns a substring from within a supplied string.

Example 1

Output

VBA is an easy programming

Excel VBA Mid Function

Example 2

Output

Excel VBA Mid Function

Pin It on Pinterest

Share This