Hi Wilco,
will this work on the Mac
Sub ertert()
Dim x, y(), i&, j&, k&, n&, sp, s$
With Sheets("What I Have")
x = .Range("A1:B" & .Cells(Rows.Count, 1).End(xlUp).Row).Value
End With
ReDim y(1 To UBound(x) * 4, 1 To 3)
For i = 2 To UBound(x)
If Len(Trim(x(i, 1))) Then
sp = Split(x(i, 2), ";")
For j = 0 To UBound(sp)
n = n + 1: y(n, 1) = x(i, 1)
y(n, 2) = Val(sp(j)): s = Split(sp(j), ",")(1)
For k = 1 To 10
If Application.Roman(k) = s Then y(n, 3) = k: Exit For
Next k
If k > 10 Then y(n, 3) = s
Next j
End If
Next i
With Sheets("What I need")
.UsedRange.ClearContents
.Range("A1:C1").Value = Array("Source", "Target", "Weight")
.Range("A2:C2").Resize(n).Value = y()
.Activate
End With
End Sub
Bookmarks