Hi
These are your sample files: https://i.postimg.cc/4xHH4FN2/Before...text-Lines.jpg
Before and After Reduce text Lines.jpg
I won’t use those for this demonstration. I prefer to use these reduced size files
content in one line input reduced sample.txt https://app.box.com/s/grrxh1rl372pzp2exn6em00ovhj4qhih
content in one line output reduced sample.txt https://app.box.com/s/mpyvgf4kj9q04szjtj0255cns24lbxos
https://i.postimg.cc/yYdStNqH/Before...ced-sample.jpg
Before and After Reduce text Lines reduced sample.jpg
It may be advisable for you to repeat the things that I am doing for you for more parts of the full size text file
So I have taken a look at your files, and done a macro for you ( Sub ReplaceInTextFileThreeCharacters__Space_vbCr_vbLf_ _WithA__Space__() )
See here for full details: https://excelfox.com/forum/showthrea...ll=1#post16696
Here the summary:
_ It does not appear that you have any tab characters in your text file
_ It seems that your text file uses the typical line separator of the two character pair, a carriage return and a line feed, ( In VBA coding, vbCr & vbLf )
_ It seems that a single space precedes the new line characters that you wish to remove
So..
_ The macro that I have done for you, ( Sub ReplaceInTextFileThreeCharacters__Space_vbCr_vbLf_ _WithA__Space__() ) , replaces the three character combination of a space and a carriage return and a line feed, with a single space.
( In the given VBA coding I replace the three character combination of " " & vbCr & vbLf with a single space " " )
It appears to give you the results you want
Alan
P.S.
Please note , susan santa 12345 et al
_ You have a number of accounts here and at other forums. Some of your posts have been deleted and/ or your accounts banned.
_ I expect your posts have been deleted and/ or your account banned, because of two main reasons:
_1) You often post poorly explained questions
_2) Often when you get help you do not give any feedback, or you do not reply. This is very uncourteous and disrespectful to the people who voluntarily give their time to help you.
And we don't know whether or not we are wasting our time helping you because we have no reply or feedback from you.
_ This is not the first time that I have said all this, or similar, to you.
I appreciate that you may not understand too well the English language, and I am much more reluctant to ban people than most forum Moderators are. But if you do not improve your posting style , I will delete you and your accounts in the future.
It is your right on a free forum to post as you choose. But if you want to continue posting in the style that you have so far, then it is probably best for you to post at the larger forums such as mrexcel.com and excelforum.com. At excelfox.com we only have a small select number of answering members, and we do not like wasting our time on people who just want a quick service to get their work done for them.
At excelfox we are interested in helping with problems, promoting, discussing, and learning office applications, not just giving a free coding writing service.
Seriously no hard feelings intended,, I am just telling you it as it is.
Alan




, I am just telling you it as it is.
Reply With Quote

Bookmarks