MID()
Segment of a string
Returnslength number of characters beginning at the specified position in the textual value. If lengthis greater than the remaining length of text, returns the remainder of the text.
Sample usage
MID("123 Maple Dr", 5, 5) returns Maple
MID("123 Maple Dr", 5, 0) returns blank
Fractional component of decimal value
The fractional component of a Decimal value in the Result column:
NUMBER(
MID(
TEXT([Result]),
(FIND(".", TEXT([Result])) + 1),
LEN(TEXT([Result]))
)
)
TEXT([Result])converts theDecimalvalue to aTextvalue. The textual functions used in this example interpret non-textual values differently. UsingTEXT()ensures theResultcolumn value is interpreted the same by each function.(FIND(".", ...) + 1)locates the beginning of the fractional component as the position immediately after the decimal point in the value.MID(..., ..., LEN(...))extracts the fractional part using a how-many value guaranteed to cover the entire fractional component.NUMBER(...)converts the extracted text to aNumber.
See also: FIND() , LEN() , NUMBER() , TEXT()
Syntax
MID(text, begin-at, length)
text- Any textual type.begin-at- Number that specifies the position, equal to or greater than 1, of the first character intextto return. A non-Numbervalue may be accepted but may produce unexpected results.length-Non-negative number of characters fromtextto return. A non-Numbervalue may be accepted but may produce unexpected results.
See also
Was this helpful?
How can we improve it?