I'm curious if there is any way to extract a range of data and output it, in order, automatically using a formula, using constraints on what is extracted. Apologies if I'm being a little vague or confusing.

Basically, if I have a column of data:

Black
White
Red
Purple
Green
Blue
Yellow
Fushia
Aqua

and a user types "2-4" in an input field, can I extract "White; Red; Purple" and output it as a second column? Would it be possible to also get a similar result if a user were to type "2-4, 7-8" (which would output "White; Red; Purple; Yellow; Fushia")? I would like to have something of this nature integrated into an excel spreadsheet, which will eventually be put onto Google Docs, so VBM and other excel-specific programming is more or less out of the question.