Thema Datum  Von Nutzer Rating
Antwort
30.12.2012 21:32:41 timi
Solved
31.12.2012 19:05:29 Trägheit
NotSolved
01.01.2013 20:33:35 Gast42162
NotSolved
01.01.2013 21:02:54 Gast47955
NotSolved
01.01.2013 21:20:56 Gast86138
NotSolved
02.01.2013 01:15:50 timi
NotSolved
02.01.2013 11:31:16 Trägheit
NotSolved
02.01.2013 23:14:17 timi
NotSolved
02.01.2013 23:20:59 timi
NotSolved
03.01.2013 14:02:37 Gast6953
NotSolved
03.01.2013 15:01:58 timi
NotSolved
Blau Dringend Hilfe mit der Umformatierung der Daten
03.01.2013 14:57:02 Trägheit
NotSolved
03.01.2013 15:10:18 timi
NotSolved
03.01.2013 15:29:29 Gast38708
NotSolved
03.01.2013 15:39:36 timi
NotSolved
03.01.2013 16:09:25 Gast87080
NotSolved
03.01.2013 16:28:22 timi
NotSolved
03.01.2013 22:16:00 Trägheit
NotSolved
03.01.2013 23:50:02 timi
NotSolved
04.01.2013 14:35:53 Gast69606
NotSolved
04.01.2013 15:13:57 timi
NotSolved
04.01.2013 18:47:41 Trägheit
NotSolved
04.01.2013 19:17:00 timi
NotSolved
05.01.2013 06:47:18 Trägheit
Solved
05.01.2013 11:03:27 timi
NotSolved
05.01.2013 18:05:58 Trägheit
NotSolved
05.01.2013 18:22:01 timi
NotSolved
05.01.2013 13:43:31 alex
NotSolved
05.01.2013 20:46:23 Trägheit
NotSolved
06.01.2013 00:59:12 alex
NotSolved
06.01.2013 15:12:10 Gast47772
NotSolved
06.01.2013 15:45:40 alex
NotSolved
07.01.2013 19:06:01 Gast50417
NotSolved
03.01.2013 23:56:30 timi
NotSolved

Ansicht des Beitrags:
Von:
Trägheit
Datum:
03.01.2013 14:57:02
Views:
1219
Rating: Antwort:
  Ja
Thema:
Dringend Hilfe mit der Umformatierung der Daten

Mal als Vorgeschmack: So ließen sich die Informationen aus dem String extrahieren.

Option Explicit

Sub test()
  
  Dim Str$, o$, c$, s$
  
  Str = "BANKERS TRUST CORPORATION(Banking services-United States Of America)"
  
  If Extract(Str, o, c, s) Then
    Debug.Print "Organistion      : " & o
    Debug.Print "Herkunftsland    : " & c
    Debug.Print "Wirtschaftsektor : " & s
  Else
    Debug.Print ">> FAILED"
  End If
  
End Sub

'////////////////
'IN : Str
'OUT: Organisation, Country, Sector
'RET: True/False
Function Extract(Str As String, Organisation As String, Country As String, Sector As String) As Boolean
  
  Dim bFlag(1 To 3) As Boolean
  Dim tmp$
  Dim i&
  
  For i = 1 To Len(Str)
    
    Select Case Mid$(Str, i, 1)
      Case "("
        If bFlag(1) Then Exit Function
        bFlag(1) = True
        Organisation = Trim$(tmp)
        tmp = ""
        
      Case ")"
        If bFlag(3) Or Not (bFlag(1) And bFlag(2)) Or Len(Trim$(tmp)) = 0 Then Exit Function
        bFlag(3) = True
        Country = Trim$(tmp)
        tmp = ""
        Exit For
        
      Case "-"
        If bFlag(2) Or Not bFlag(1) Or bFlag(3) Then Exit Function
        bFlag(2) = True
        Sector = Trim$(tmp)
        tmp = ""
        
      Case Else
        tmp = tmp & Mid$(Str, i, 1)
        
    End Select
  Next
  
  Extract = True
  
End Function

Bleibt nur noch die Frage offen, wie diese wo eingefügt werden sollen. Extra-Zeile dafür, oder in eine extra Spalte daneben. Das ist mir noch nicht ganz klar.


Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:



  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen

Thema Datum  Von Nutzer Rating
Antwort
30.12.2012 21:32:41 timi
Solved
31.12.2012 19:05:29 Trägheit
NotSolved
01.01.2013 20:33:35 Gast42162
NotSolved
01.01.2013 21:02:54 Gast47955
NotSolved
01.01.2013 21:20:56 Gast86138
NotSolved
02.01.2013 01:15:50 timi
NotSolved
02.01.2013 11:31:16 Trägheit
NotSolved
02.01.2013 23:14:17 timi
NotSolved
02.01.2013 23:20:59 timi
NotSolved
03.01.2013 14:02:37 Gast6953
NotSolved
03.01.2013 15:01:58 timi
NotSolved
Blau Dringend Hilfe mit der Umformatierung der Daten
03.01.2013 14:57:02 Trägheit
NotSolved
03.01.2013 15:10:18 timi
NotSolved
03.01.2013 15:29:29 Gast38708
NotSolved
03.01.2013 15:39:36 timi
NotSolved
03.01.2013 16:09:25 Gast87080
NotSolved
03.01.2013 16:28:22 timi
NotSolved
03.01.2013 22:16:00 Trägheit
NotSolved
03.01.2013 23:50:02 timi
NotSolved
04.01.2013 14:35:53 Gast69606
NotSolved
04.01.2013 15:13:57 timi
NotSolved
04.01.2013 18:47:41 Trägheit
NotSolved
04.01.2013 19:17:00 timi
NotSolved
05.01.2013 06:47:18 Trägheit
Solved
05.01.2013 11:03:27 timi
NotSolved
05.01.2013 18:05:58 Trägheit
NotSolved
05.01.2013 18:22:01 timi
NotSolved
05.01.2013 13:43:31 alex
NotSolved
05.01.2013 20:46:23 Trägheit
NotSolved
06.01.2013 00:59:12 alex
NotSolved
06.01.2013 15:12:10 Gast47772
NotSolved
06.01.2013 15:45:40 alex
NotSolved
07.01.2013 19:06:01 Gast50417
NotSolved
03.01.2013 23:56:30 timi
NotSolved