
=SINISTRA(A1;LUNGHEZZA(A1)-9) |
stri = Range("a1")
Range("a3") = Split(stri, " - ")(0)
Range("b3") = " - "
Range("c3") = Split(stri, " - ")(1) |
k=range("a" & rows.count).end(xlup).row
for i=3 to k
cells(i,3) = Split(cells(i,1), " - ")(0)
cells(i,4)= " - "
cells(i,5)= Split(cells(i,1), " - ")(1)
next |
Sub DIVIDI()
Dim uriga1 As Long
Sheets("Foglio1").Activate
uriga1 = Range("A" & Rows.Count).End(xlUp).Row
If Cells(1, 1) >= 1 Then
For x = 1 To uriga1 ' parto dalla riga n° 1 fino all'ultima attiva
stri = Range(Cells(x, 1), (Cells(x, 1)))
Range(Cells(x, 2), (Cells(x, 2))) = Split(stri, " - ")(0)
Range(Cells(x, 3), (Cells(x, 3))) = " - "
Range(Cells(x, 4), (Cells(x, 4))) = Split(stri, " - ")(1)
Next
End If
End Sub
|
