ELEMENT()
The ELEMENT function is used to extract individual values from a cell containing a list.
Cell A1: Dog,Cat,Mouse
=ELEMENT(a1,1) returns "Dog"
=ELEMENT(a1,2) returns "Cat"
=ELEMENT(a1,3) returns "Mouse"
=ELEMENT(a1,4) returns ""
=ELEMENT(a1,-1) returns "Mouse"
While the ELEMENT() function can be implmented using the builtin Excel functions FIND, MID and other text functions, the ELEMENT function is easier to work with and handles very long lists better.
Syntax
ELEMENT(String-List,Index,Delimiter,Value if Blank,Options)
Examples
Cell A1: 34-22-32
=ELEMENT(a1,1,"-") returns "34"
=ELEMENT(a1,1) returns "34-22-32" [The delimter in cell A1 is "-", not a comma]
=ELEMENT(a1,88,"-","String Empty") returns "String Empty" [We requested index=88 from a list that has only 3 values]