Solved

Text convert in excel

Posted on 2011-03-13
2
225 Views
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:

Ex:

ColumnA

Jean
Carl
Paul
Steve


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


How can i do this please?

Thanks again

0
Comment
Question by:Wilder1626
[X]
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
2 Comments
 
LVL 24

Accepted Solution

by:
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

0
 
LVL 11

Author Closing Comment

by:Wilder1626
ID: 35122145
Perfect

Thanks for your help
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

739 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