ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Extracting sub-strings from a large string (https://www.excelbanter.com/excel-programming/426937-extracting-sub-strings-large-string.html)

[email protected]

Extracting sub-strings from a large string
 
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.

Mike H

Extracting sub-strings from a large string
 
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

" wrote:

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.


Don Guillett

Extracting sub-strings from a large string
 

Have a look at
datatext to columnsdelimited;
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

wrote in message
...
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.




All times are GMT +1. The time now is 10:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com