extracting the n-th element of a string

A

andrew

would like to extract all of these elements:

int.de.sh.k.wand

Left([string],InStr([string],".")-1) gives "int"

would like to be able to separate out de, sh, k, and wand as well.

InstrRev?

Any suggestions?

Thank you.
 
B

Brian

Use the Split function, indicating the period as the delimiter. This will
split it at every period. See also the VBA help on the Split function.

=Split(Field1,".")(0) ' part1
=Split(Field1,".")(1) 'part2
=Split(Field1,".")(2) 'part3
=Split(Field1,".")(3) 'part4
=Split(Field1,".")(4) 'part5
 
Top