Jump to content

Removing extra carriage from the list of values


This topic is 3763 days old. Please don't post here. Open a new topic instead.

Recommended Posts

This is a small technique for removing extra carriage from a list of values where the No of carriage is not constant.

 

For example ,

"1¶2¶3¶4¶4¶¶4¶¶¶¶5¶¶¶¶¶¶¶¶¶¶¶¶6" is the input and we need the output as "1¶2¶3¶4¶4¶4¶5¶6".

 

 

This simple online function will help to achieve this. 

 

Substitute ( Text ; ["¶¶" ; "¶#"];["#¶";""] ;["#";""] )

 

We need to be careful with "#" symbol. If the list itself contains "#" then it will create a problem.

We can use any symbol or charecter (if we are sure that the list contains only numbers ) in place "#", which is not present in the list.  

 

 

 

 

- Thank You.

  • Like 1
Link to comment
Share on other sites

Nice!!  I did notice that if it begins with carriage return(s) or ends with carriage return(s) that it leaves a single leading and trailing return.  There are easy ways of addressing this but also were you aware of this http://www.briandunning.com/cf/166

 

Still ... I prefer singular reference (CFs mean dealing reviewing two locations rather than one) when possible.  If you address the leading and trailing, I think this is a winner.   :laugh2:

 

Also, I would use something less common than #.  Even tilde ~ would work.  Thanks for piquing my interest!


I'll let you fix up your own calc - you are doing quite well without me.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.