• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 192
  • Last Modified:

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.
Mischelle.xlsx
0
rtod2
Asked:
rtod2
1 Solution
 
Saqib Husain, SyedEngineerCommented:
See if this macro does what you are looking for

Saqib
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

0
 
rtod2Author Commented:
very slick !!   following up with new related question
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now