Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi
in excel sheet in a column [Ticked_Id] i have 5 different type od data
1) 0
2) C /CNL FEE
3) F16071
4) F16071/0000000241
5) FF16071 /0000000141 24A20
first three (1,2,3 ) wont change
but at last two (4,5) i want the code after "/" as 10 character (0000000241)
at (4) "/" is 7th character; at (5) "/" is 9th character after space.
how i can write this in is statement.
thanks
If that is definitely the rule you want to apply then try:
LEFT(TEXT(SubField(YourField,'/',2)),10)
or
MID(YourField,Index(YourField,'/'),10)
Jason
Text(SubField(Ticked_Id,'/',2)) should do it.
thanks Jason it is helpful
but this time i cant see (1,2,3) and also isee (5) as 0000000141 24A20
but i wanna see (5) as 0000000141
Oops - my bad. No problem - but first let me check your required output:
1) 0
2) CNL
3) F16071
4) 0000000241
5) 0000000141
Is this right? Note that 2) HAS changed as it contains a / and a space.
Jason
1) 0
2) CNL
3) F16071
4) 0000000241
5) 0000000141
yes this is the correct output that i want
thanks a lot
In that case try:
Text(Mid(YourField,RangeMax(Index(YourField,'/'),1),IF(Index(YourField,' ')<>0,Index(YourField,' ')-Index(YourField,'/')+1)))
(might have missed a parethesis in there somewhere...can't test it right now!)
thanks but it turns output only
FF16071
Hmm - maybe:
Text(Mid(YourField,RangeMax(Index(YourField,'/'),1),IF(Index(YourField,' ')>0,Index(YourField,' ')-Index(YourField,'/')+1,Len(YourField))))
Jason thank you very much you are very helpful but this time
the output is
/0000000141 but there musnt be /
also i cant see C /CNL FEE as output
i am new to qlikview so it will be difficult for me to find the result
can you please help again.
thanks
Text(Mid(YourField,RangeMax(Index(YourField,'/')+1,1),IF(Index(YourField,' ')>0,Index(YourField,' ')-Index(YourField,'/')+1,Len(YourField))))
The change above should sort out the / at the start. However this expression is designed to get everything between / and a space. This will translate C /CNL FEE to CNL. I warned about this above.
Jason