Concatenate and formatting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

does anyone know if there is a way to include text formating in a concatenate function. I have three pieces of text, two of which need to be bolded and all of them concatenated together

a1 = "Text 1" (bold)
a2 - "Text 2"
a3 = "Text 3" (bold)

I'm looking to do =a1&a2&a3

Thank you in advance
 
No can do. Formulas don't allow that kind of manipulation. Maybe your best
bet is to put it together via VBA as a constant, then do the bolding. This
way, the VBA can trap an event for cells A1->A3 changing & reformat.

Bob Umlas
Excel MVP

jrdpig said:
does anyone know if there is a way to include text formating in a
concatenate function. I have three pieces of text, two of which need to be
bolded and all of them concatenated together
 
does anyone know if there is a way to include text formating in a
concatenate function. I have three pieces of text, two of which need to be
bolded and all of them concatenated together
a1 = "Text 1" (bold)
a2 - "Text 2"
a3 = "Text 3" (bold)

I'm looking to do =a1&a2&a3

An interesting problem which had me guessing. I have managed to do it using
VB so I suppose it's possible to use a user defined function and get the
same effect. Anyway, here is the code:

Sub Macro1()
Range("A4").Select
ActiveCell.FormulaR1C1 = Range("a1").Value & Range("a2").Value &
Range("a3").Value
ActiveCell.Characters(Start:=4, Length:=3).Font.FontStyle = "Bold"
End Sub

Not sure if you could do it directly with worksheet functions mind you, but
then I say this and someone else always proves me wrong!

HTH

Chris
 
Hi jrdpig!

There is very limited ability to do this:

Example:
=A1&A2&TEXT(A3,"dd-mmm-yyyy")

A1: The
A2: Date is
A3: =Today()

Returns:

TheDateis07-Jan-2004

But it is very limited in terms of being able to represent numbers in
a number format; remember that dates are numbers.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
jrdpig said:
does anyone know if there is a way to include text formating in a
concatenate function. I have three pieces of text, two of which need
to be bolded and all of them concatenated together
 
Back
Top