Formula and text within same cell

  • Thread starter Thread starter xadamz23
  • Start date Start date
X

xadamz23

Hello all,

Is there a way to have a formula and text within the same cell?

This is what I want to do:


Date: =TODAY()


Is there a way I can get the formula to work with the text "Date:" in
the same cell?

Thanks
 
Jason said:
*="Date: "&TEXT(TODAY(),"mm/dd/yy")
...
Thanks Jason that works great. I want to make Date:*

appear in bold. Can I do that?


Not with a formula. Text returned by formulas can have one and only one format
at any given time. Either 'Date: ' would also have to be boldface or none of it
could be. The only way to have different typefaces is to have 'Date:' and
=TODAY() in different cells.
 
Only through VBA macro.

Select cell(s) and run this macro.

Formulas will be changed to values and "Date:" part will be bold.

Sub CellFont()
Selection.Copy
With Selection
.PasteSpecial Paste:=xlPasteValues
.Characters(Start:=1, Length:=5).Font.Bold = True
End With
End Sub

Gord Dibben Excel MVP

Jason said:
*="Date: "&TEXT(TODAY(),"mm/dd/yy")

HTH
Jason
Atlanta, GA



Thanks Jason that works great. I want to make Date:*

appear in bold. Can I do that?

 
Only through VBA macro.

Select cell(s) and run this macro.

Formulas will be changed to values and "Date:" part will be bold.

Sub CellFont()
Selection.Copy
With Selection
.PasteSpecial Paste:=xlPasteValues
.Characters(Start:=1, Length:=5).Font.Bold = True
End With
End Sub

This is highly specialized, so not too useful. Also, macros aren't necessary.
Type the formula

="Date: "&TEXT(TODAT(),PreferredDateFormatHere)

and press [F9] rather than [Enter], then press [F2], then use cursor keys to
select the portion of the result to appear in boldface, press [Ctrl]+B then
[Enter].

For a more general macro-driven approach, see

http://www.google.com/[email protected]

and

http://www.google.com/groups?selm=vj3_9.11871$rq4.866845@bgtnsc05-news.ops.worldnet.att.net
 
Back
Top