Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
saumyashah90
Specialist
Specialist

Delete 1st and Last character of the Text

I have column

Header 1
, Saumya,
,Raj,Peter,
,Peter,
Peter
,Raj,Saumya,Peter,
Sam
,Sam,Peter,Raj,

I need output as:

Saumya

Raj,Peter

Peter

Raj,Saumya,Peter

Sam

Sam,Peter,Raj

Can you help me in this?

1 Solution

Accepted Solutions
saumyashah90
Specialist
Specialist
Author

=Left(Right(TEAM,Len(TEAM)-1),Len(TEAM)-2)

This worked

View solution in original post

5 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

This will remove the first an last character:

     =Substr([Header 1], 2, Len([Header 1]) - 2)

You may also want to Trim() this:

     =Trim(Substr([Header 1], 2, Len([Header 1]) - 2))

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable

mid(yourstring,2,len(yourstring)-2) should work

saumyashah90
Specialist
Specialist
Author

=Left(Right(TEAM,Len(TEAM)-1),Len(TEAM)-2)

This worked

saumyashah90
Specialist
Specialist
Author

Thanks Jonathan this works too

saumyashah90
Specialist
Specialist
Author

Thanks this works too