text strings

  • Thread starter Thread starter dstiefe
  • Start date Start date
D

dstiefe

I have a lot of data in one cell in excel...and the data looks like this...

(e-mail address removed); (e-mail address removed);

I want to copy the text between each semilcolon...then past it to a new cell..

how do i loop through the cell and copy the data between each semicolon?

Thank you
 
With the data in cell C1 the below macro will extract the information and
write to colA starting from Row1....Without using macros you can try out
Data-->Text to Columns with semicolon as delimiter

Sub ExtractCellData()
Dim intTemp As Integer
Dim strData As String
Dim arrData As Variant
strData = Range("C1")
arrData = Split(strData, ";")
For intTemp = 0 To UBound(arrData)
Range("A" & intTemp + 1) = Trim(arrData(intTemp))
Next
End Sub


If this post helps click Yes
 
dstiefe,

- Select the cells that have data like this. Columns to the right should be
blank. Each email address will be placed in cells to the right of the ones
selected.
- "Data" menu > "Text to Columns..." submenu
- Make sure "Delimited" is selected
- Click the "Next >" button
- Check "Semicolon"
- Consider unchecking all other delimiters...especially if any of them show
up in the data.
- Click the "Finish" button to execute immediately...
....or...
- Click the "Next >" button just to see what settings are on the next page
- Do not make any changes on Step 3
- Click the "Finish" button.

HTH,

Conan Kelly
 

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

Back
Top