enno13

VB ein bestimmtes Komma durch Punkt ersetzen

Hallo

Wie kann ich denn ein bestimmtest Komma durch einen Punkt ersetzten lassen über VB.
Dieses Komma ist eine Fehleingabe vom Mitarbeiter. Der mal einen Punkt, wie es sein soll, und mal ein Komma hineinschreibt.
Siehe Beispiel: 2 Stellen vor dem Wort Mikrosa
20150923_043837,=,1_468_C60_027,3,2,Mikrosa_01,5193,EH_01,MFU100_6,iO
20150923_043837,=,1_468_C60_027,3.2,Mikrosa_01,5193,EH_01,MFU100_6,iO
Danke
Auf Facebook teilen
Auf X (Twitter) teilen
Auf Reddit teilen
Auf Linkedin teilen

Content-ID: 283660

Url: https://administrator.de/forum/vb-ein-bestimmtes-komma-durch-punkt-ersetzen-283660.html

Ausgedruckt am: 07.05.2025 um 05:05 Uhr

114757
114757 23.09.2015 aktualisiert um 10:37:27 Uhr
Goto Top
If Mid(strText,34,1) = "," then  
   strText = Left(strText,32) & Replace(strText,",",".",33,1,vbTextCompare)  
End if

http://www.vbarchiv.net/commands/cmd_replace.html

Gruß jodel32
Enno13
Enno13 23.09.2015 aktualisiert um 09:48:06 Uhr
Goto Top
Ok das funktioniert, aber er schneidet mit alles was vor 3.2 steht weg, das sollte aber bestehen bleiben

3.2,Mikrosa_01,5193,EH_01,MFU100_6,iO
soll aber so:
20150923_043837,=,1_468_C60_027,3.2,Mikrosa_01,5193,EH_01,MFU100_6,iO
114757
114757 23.09.2015 um 10:40:35 Uhr
Goto Top
s. Korrektur oben ...
Enno13
Enno13 24.09.2015 um 11:28:44 Uhr
Goto Top
Danke