Getting the nth item out of a string of delimited items

  • Thread starter Thread starter Dorian Chalom
  • Start date Start date
D

Dorian Chalom

Im looking for a function that will get me the nth item out of a stringof
delimited items....

Something like _______("Apple, Orange, Peach", 2) would return "Orange"

Is there such a built in function or does some one have one built?
 
Thats what I was looking for Choose

thank you

Marshall Barton said:
strList = "Apple, Orange, Peach"

X = Split(strList, ", ")(1)

Or if you just want to pick from a list:
x = Choose(2, "Apple", "Orange", "Peach")
 
Back
Top