combine column contents

Some cells are empty which is ok.  I am looking to combine the contents of each cell in Column C with the adjacent cells in Column D.  Ideally, I would like to have the word Reserved Words in bold, and then the reserved words underneath.  Immediately following Reserved Words, I would like to see Input Parameters in bold.  By contrast, the input parameters themselves should appear underneath the words Input Parameters.

Assistance is greatly appreciated.
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.

Saqib Husain, SyedEngineerCommented:
See if this macro does what you are looking for

Sub combinecolumns()
For Each cel In Columns(3).Cells
If cel.Value <> "" Then
cel.Offset(0, 1).Value = "Reserved words" & vbLf & cel.Value & vbLf & "Input parameters" & vbLf & cel.Offset(0, 1).Value
cel.Offset(0, 1).Characters(Start:=1, Length:=14).Font.FontStyle = "Bold"
cel.Offset(0, 1).Characters(Start:=15 + Len(cel.Value) + 1, Length:=16).Font.FontStyle = "Bold"
End If
Next cel
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
rtod2Author Commented:
very slick !!   following up with new related question
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.