excel - How to substitute multiple line feed with a single line feed -
I have this data wrapped in a single cell.
This is a nightmare
For my report formatting purpose, I have to reduce multiple line feeds. Whenever there are more than 2 line feeds between 2 strings, they need to be replaced by 2 line feeds. So data should be seen
This is a nightmare
I'm just getting started with Excel scripting. I tried to use the alternative function but could not get the correct result.
Can there be looping using some options?
Whenever there are more than 2 line feeds between the two strings, they are exactly 2 lines Need to be replaced by the feed.
Use this short function:
function customsubstit string (myStr as string) as customsubstitute = myStr while InStr (1, customSubstitute , CHR (10) & CHR (10) & CHR (10)) Replace customSubstitute = (Custom Subscriptions, Crow (10) & Crow (10) & Crow (10), Crow (10) & Crow (10)) Loop End function
Comments
Post a Comment