enno13
Goto Top

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

Content-Key: 283660

Url: https://administrator.de/contentid/283660

Printed on: April 19, 2024 at 01:04 o'clock

Mitglied: 114757
114757 Sep 23, 2015 updated at 08:37:27 (UTC)
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
Member: Enno13
Enno13 Sep 23, 2015 updated at 07:48:06 (UTC)
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
Mitglied: 114757
114757 Sep 23, 2015 at 08:40:35 (UTC)
Goto Top
s. Korrektur oben ...
Member: Enno13
Enno13 Sep 24, 2015 at 09:28:44 (UTC)
Goto Top
Danke