Home > Topics > excel > What is the function of mid?

What is the function of mid?

藏色散人
Release: 2019-06-03 10:04:02
Original
19828 people have browsed it

What is the function of mid?

Mid is a string function in Visual Basic and Microsoft Excel. Its function is to intercept a specified number of characters from a string.

The three parameters of this function are equivalent to each other in VB and Excel, but the Length parameter in VB can be omitted, while the num_chars parameter in Excel cannot be omitted.

When the Start (start_num) parameter is less than 1, the function returns an error;

When the Start parameter value is greater than the String (text) parameter length, an empty string is returned;

If the length of the interception from the Start parameter exceeds the end of the string, or the Length parameter is omitted, all characters from the Start parameter position to the end of the string will be returned.

Grammar

##VB in

Mid(String As Variant, Start As Long, [Length As Variant]) As Variant
Mid$(String As String, Start As Long, [Length As Variant]) As String
Copy after login

Excel

MID(text, start_num, num_chars)
Copy after login

What is the function of mid?

The above is the detailed content of What is the function of mid?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
mid
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template