
Sub copiaA_B()
Dim copia
For i = 1 To Range("A" & Rows.Count).End(xlUp).Row
copia = Cells(i, 1)
Cells(i, 2).Select
Selection.NumberFormat = "@"
If copia <> "" Then
If IsDate(copia) = True Then
Cells(i, 2) = Format(copia, "dd/mm/yyyy")
ElseIf IsNumeric(copia) = True Then
Cells(i, 2) = CStr(copia)
Else
Cells(i, 2) = copia
End If
End If
Next i
Range("a1").Select
End Sub
|
Sub FileTesto()
FN = FreeFile
For I = 1 To Range("A65536").End(xlUp).Row
If Range("A" & I) <> "" Then
Open ActiveWorkbook.Path & "" & Range("B" & I) & ".txt" For Append As #FN
Print #FN, Range("A" & I)
Close #FN
End If
Next I
End Sub |
