To join 1st line & 2nd line of text in text in Excel VBA Code
Hi Norhaya
You need to give a little more info on how your sample are delimited in the
text file (i.e. are they comma delimited or tab delimited or may you have a
disk file). If you already have that info, then to join two text strings just
use the ampersand operator as follows:
Sub JoinTXT()
Dim String1 As String
Dim String2 As String
Dim String3 As String
String3 = String1 & String2
End Sub
If this helps please click "Yes"
<<<<<<<<<<
"norhaya" wrote:
Hi
I have a large text file for import. I need some ideas to combine to line of
strings (text)
Below is the sample of text
Before
sample (1)
aaaaaaa
bbbbbbbbbbbbbbbb
sample (2)
ccccccccccccc
dddddddd
After
Sample (1)
aaaaaaa bbbbbbbbbbbbbbbb
Sample (2)
ccccccccccccc dddddddd
I just need the vba code to join the text. Any inputs is highly appreciated.
|