Need a script for excel

I need a script for excel that will do the following:
Column A of my spreadsheet contains a list of words
I need the script to insert as many columns as needed on the right and populate  these columns with the individual characters of these words.


Say Column A has 3 words on 3 rows
A1= "car"
A2= "software"
A3 = "ball"

Then the macro will insert 8 columns with
B1 = "c", B2 ="s", B3 ="b"
C1 = "a", C2 = "o", C3 = "a" etc...

- font and style should stay the same as the starting words
- should also work if the startind data is not a word but a number

Jean-Christophe GALLANDKorea R&D DirectorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
for cell B1, try use formula:


Open in new window

and dragdown and right accordingly.
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
sample as attached.

pls try

Sub macro()
Set myRange = Range(Range("A1"), Range("A1").End(xlDown))
For Each c In myRange
    Set SubRange = c.Resize(1, Len(c.Value) + 1)
    strValue = c.Value2
    For Idx = 2 To SubRange.Cells.Count
        Cells(c.Row, Idx) = Mid(strValue, Idx - 1, 1)
End Sub

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jean-Christophe GALLANDKorea R&D DirectorAuthor Commented:
Ryan Chong
Sorry but what I needed was a VBscript macro
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.