Extracting sub-strings from a large string

J

jimdellin

I have a large list of about 1,200 names and addresses in one cell
with each name+address being separated by a semi-colon. I want to
pull out each name and address and place it in a separate row. I
would really appreciate help with this.
 
M

Mike H

Hi,

This assumes your data are in A1. Right click your sheet tab, view code and
paste this in and run it. It will put the split data in A2 down

Sub stance()
SrcData = Range("A1").Value
OutPutData = Split(SrcData, ";")
For SplitData = 0 To UBound(OutPutData)
Range("A" & SplitData + 1) = OutPutData(SplitData)
Next
End Sub

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top