MID

Returns a segment of a string. Learn more

Video field
Text

The MID() function in Google Sheets is used to extract a substring from a given text or string.

It allows you to specify the starting position and the length of the substring you want to extract.

The syntax for the MID() function is as follows:

MID(text, start, num_chars)

text: This is the original text or string from which you want to extract the substring.

start: This is the starting position of the substring within the original text. It can be a number or a cell reference.

num_chars: This is the number of characters you want to extract from the original text.

Here's an example to illustrate the usage of the MID() function:

=MID("Hello, World!", 8, 5)

In this example, the function will extract a substring starting from the 8th character of the text "Hello, World!" and return 5 characters. So the result would be "World".

You can also use cell references instead of static text. For example:

=MID(A1, 2, 3) Assuming cell A1 contains the text "Hello", this formula will extract a substring starting from the 2nd character and return 3 characters. So the result would be "ell".

Note that the position numbers are 1-indexed, meaning the first character is at position 1, the second character is at position 2, and so on.

Want even more from Google Sheets?


With Softr, you can turn your spreadsheets into powerful web apps.You can give advanced roles and permissions to each user, build advanced logic and automation flows, customize the design to your needs, and much more.


Softr also offers a growing library of templates for internal tools, client portals, community hubs, and more. The templates come with a Google Sheet or an Airtable base that you can use to store and manage your data easily.


Try Softr now and build your custom web apps in 10 minutes no code required!