Currently I have developed an operation tool which compares complex engineering source files of a DCS. Therefore I have to replace certain 'TagNames'.
The code where the replacing applies:
For g = 8 To amountofreplace 'replace the string with every potential transition
With Sheets("Compare")
orgi = .range("L" & g).Value
copy = .range("J" & g).Value
tmp_string = Replace(tmp_string, copy, orgi)
End With
An example would be tmp_string = 200TT-50 or 200TX-50 or 200GG-50
This should be transititioned to 350TT-50 or 350TX-50 or 350GG-50
So right now I would add the transitions 200TT --> 350TT 200TX --> 350tx
But what I would prefer is to appy this transition 200$$ --> 350$$
$ would mean a character [A-Z] So that when it gets applied it will directly apply all the transitions I mentioned above.
Wildcard does not work with Replace function.. Who has a clue? Because I will fill in different transitions all the time. So Regex doesn't seem like a solution to me.
Thanks in advance,
You can use VBA.Left() like in