Combine multiple cells (3) adding a Colon (:)

I

israel

Hi,

I have 3 columns with 500 rows. I would like to combine 3 cells
horrizontally into 1 cell adding a colon :)) between each combined cell.

At the same time is it possible to indicate the first colon to be bold and
the rest normal?

I appreciate your response.
Thank you
 
G

Gary''s Student

Say be begin with data in columns A & B & C.

In D1 enter:

=A1 & ":" & B1 & ":" & C1

then copy column D and PasteSpecial > Values onto itself.

FOrmatting a sinlge character can either be done manually or with a macro.
 
S

Shane Devenshire

Hi,

You really can't format part of a formula, so if you follow GS's suggestion
of converting to values you will be able to format the first colon, however,
with 500 of these I would do it with code, not manually.

Here's some sample code, to run it you select the range where you converted
the formulas to value and run it...

Sub FormatColon()
Dim X As Integer
Dim cell As Range
For Each cell In Selection
X = InStr(1, cell, ":")
cell.Characters(X, 1).Font.Bold = True
Next cell
End Sub
 
I

israel

I did follow GS's instruction and it worked well combining the cells with a
colon, what you are suggesting is a bit more than I manage. If it won't be
much of a bother I would ask you to indicate from step 1 where and how to
insert the code.

In matter of fact once I combined the cells, cell A1 & B1 which is designed
to be bold, turned normal in the combined cell. If you can help me with this
it would be greatly appreciated.

Thank you, Thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top