---
schema_version: "1"
id: d16a52ad9cbe972370b3bc6c41dae770767b9148569308cbce09935d5d25ad26
title: MID
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/customize_functions_mid.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.customize_functions_mid.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: ae48201842178a8d3a230cceb88affefb94d360192e1ebab65975bed2524e386
description: Returns the specified number of characters from the middle of a text string given the starting position.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# MID

Returns the specified number of characters from the middle of a text string given the starting position.

## Use

`MID(text, start_num, num_chars)` and replace text with the field or expression to use when returning characters; replace start\_num with the number of characters from the left to use as a starting position; replace num\_chars with the total number of characters to return.

![String Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_example.png)

String Example `MID(Division, 3, 4)` returns four characters of the Division name beginning with the third character from the left. On a user record, this represents the department code.