MID - Returning a Specified Number of Characters from a Specified Position of a

  • Last update:August 22, 2023
  • Overview

    Grammar

    MID(text,start_num,num_chars)

    Returns a user-specified number of characters from a specified position of a string.

    Parameter 1

    Text

    Text string containing characters to be extracted

    Parameter 2

    Start_num

    Starting position to extract characters. To extract from the first character in the text, set start_num to 1. The rules for extracting from other positions of characters are deductive.

    Parameter 3

    Num_chars

    Number of characters to be extracted

    Notes

    • The MID function supports 3 parameters, among which the first parameter is of any type, and the second and third are numeric.

    • If start_num is greater than the length of text, MID returns "" (empty text).

    • If start_num is less than the length of text, but it plus num_chars exceeds the text length, MID returns the characters from the starting position to the end of text.

    • If start_num is less than 1, MID returns the error value *VALUE!.

    • If num_chars is less than 0, MID also returns the error value *VALUE!.

    Example

    FormulaResultNotes
    MID("Finemoresoftware",9,8)software/


    附件列表


    主题: Advanced Data Analysis
    Previous
    Next
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    9s后關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy