Dear Mallycat,
Thanks for your answer. Sorry but I did not understand how to do what you have explained. Isn't there a way to to what I want with a macro? I will post here a code that I'm using to add text to a .txt a little bit similar with this, but that I don't know how to adapt it to this problem:
Sub AddStation()
Dim i As Integer, tmp As String
i = 1
cPath = ThisWorkbook.Path & "\"
Open cPath & "test.txt" For Input As #1
Open cPath & "output.txt" For Output As #2
Do Until EOF(1)
Line Input #1, tmp
If InStr(1, tmp, "''") > 0 Then
tmp = Replace(tmp, "''", "'TEST" & i & "'")
i = i + 1
End If
Print #2, tmp
Loop
Close #1
Close #2
End Sub
Is there a way to use this kind of code to solve my current problem?
Thanks
Bookmarks