Excel split

Hello

I have in the same cell in excel the next values,

cell A1

S012
S014

the cell or variable show me in the message box :

MESSAGE BOX : S012
S014

I need to keep in a string or variable new Mol1= S012 nad the nest Mol2= S014

but I can´t

I tried the next

Mol= MoL.Split({System.Environment.Newline}, System.StringSplitOptions.RemoveEmptyEntries)(0).Trim

and don´t have the variable but only one first and the other after.

regards

Instead of splitting based on next line try to split with space.

This should work for you -

Mol1=MoL.Split(Convert.ToChar(Environment.NewLine))(0)
Mol2=MoL.Split(Convert.ToChar(Environment.NewLine))(1)