Get value between commas
-
21/شعبان/1433 09:40 ص
Hello all,
Can somebody help me with the following problem?
I want to get the value between commas, my cels are looking like this
AAA,12345,B,C
AA,12,BBBB,CCC
AAAA,123456789,122,AA
And I just want the second part, all the numbers.
Thank you
- تم النقل بواسطة litdevMicrosoft Community Contributor 21/شعبان/1433 05:40 م (From:Small Basic)
جميع الردود
-
21/شعبان/1433 10:42 ص
how about this?
List()
For j=1 to 3
D[j]=D[j]+"," ' for end point
start=1
L= Text.GetLength(D[j])
NN=0
For i=1 To L
If Text.GetSubText(D[j],i,1)="," Then
NN=NN+1
Da[j][NN]= Text.GetSubText(D[j],start,i-start)
TextWindow.WriteLine(J+" : "+NN+" : "+Da[j][NN])
start=i+1
EndIf
EndFor
TextWindow.WriteLine(" ")
endforSub List
D[1]="AAA,12345,B,C"
D[2]="AA,12,BBBB,CCC"
D[3]="AAAA,123456789,122,AA"
EndSub -
21/شعبان/1433 10:46 صstr="abc,123,qwerty"
str= Text.GetSubTextToEnd(str, 1+Text.GetIndexOf(str,","))
str= Text.GetSubText(str,1, Text.GetIndexOf(str,",")-1)
TextWindow.WriteLine(str) ' <<< is now 123Jan [ WhTurner ] The Netherlands
-
21/شعبان/1433 10:49 ص
You can use my extension : SayPlus! Extension
Who has the function : GetArguments()
It can get every text or number that is between spaces.
-
21/شعبان/1433 12:01 مthanks a lot, but I need it for a SQL Query :-s
-
21/شعبان/1433 12:12 مThen you are in the wrong forum !
Jan [ WhTurner ] The Netherlands