How to extract data from File Path
Hi Jim
Thanks for your help!!
I have modified the code to this:-
Sub Macro2()
'
Dim var As Variant
For Each rCell In Range("D2:D65536")
var = VBA.Split(rCell.Text, "\", -1)
rCell.Offset(0, 3).Value = var(2)
rCell.Offset(0, 4).Value = var(3)
Next
End Sub
It extracted the values but gives me an error Subscript out of range.
Am I doing something wrong?
Thanks again!!
On Jun 13, 2:43 pm, "Jim Cone" wrote:
For Each rCell in rngCol.Cells
var = VBA.Split(rCell.Text, "\", -1)
rCell.Offset(0, 3).Value = var(2)
rCell.Offset(0, 4).Value = var(3)
Next
--
Jim Cone
San Francisco, USAhttp://www.realezsites.com/bus/primitivesoftware
"DK" wrote in message
Jim,
Where are we specifying the column that would have the result? I don't
need it to show up in a Msg Box. I have about 35000 rows which have
the same kind of format. The File Path data is in Column D and the
data needs to be extracted in Col G & H.
|