Text convert in excel

Posted on 2011-03-13
Last Modified: 2012-08-13
Hello all

I need your help with a macro

I have text in column A.

I need to be able to take all text in column a and convert it like this in cell B1:




B1 would be: "Jean", "Carl", "Paul", "Steve",

How can i do this please?

Thanks again

Question by:Wilder1626
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 24

Accepted Solution

StephenJR earned 500 total points
ID: 35122102
You could do it like this:
Sub x()

Dim r As Range, s As String

For Each r In Range("A1", Range("A1").End(xlDown))
    s = s & """" & r & """, "
Next r

Range("B1") = Mid(s, 1, Len(s) - 2)

End Sub

Open in new window

LVL 11

Author Closing Comment

ID: 35122145

Thanks for your help

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question