Getting the nth item out of a string of delimited items

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?
 
D

Dorian Chalom

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")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top