Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Formatting Part of Text String a Different Size

I am currently tring to format a form to look how I would like it to. I have
run into a problem. the current cell has the has a formula

=""Date Signed[Alt+Enter]"&TEXT(A1,"MM/DD/YY")

I currently have the cell font at an 8, which is what I would like the Date
Signed text to show, however I would like the date that I bring in to be at a
12 font on the next line. Can I set the format in the text command to resize
the text, or is there another way to do this?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Formatting Part of Text String a Different Size

Formulas don't support this kind of formatting.

=""Date Signed[Alt+Enter]"&TEXT(A1,"MM/DD/YY")
could be:
="Date Signed"&char(10)&TEXT(A1,"MM/DD/YY")

You could use two different cells or you could convert to a value and then use
this kind of formatting.

briancrosier wrote:

I am currently tring to format a form to look how I would like it to. I have
run into a problem. the current cell has the has a formula

=""Date Signed[Alt+Enter]"&TEXT(A1,"MM/DD/YY")

I currently have the cell font at an 8, which is what I would like the Date
Signed text to show, however I would like the date that I bring in to be at a
12 font on the next line. Can I set the format in the text command to resize
the text, or is there another way to do this?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default Formatting Part of Text String a Different Size

As Dave mentioned, formulas can't have parts of their evaluated text
formatted differently than other parts of the text... it's all or nothing.
However, if a VB solution is acceptable, we can use event code to replace
your formula and it work exactly as you want it to. Delete your formula from
the cell or cells that it currently is in. Next, right-click the tab at the
bottom of your worksheet and select View Code from the popup menu that
appears. Then, copy/paste this code into the code window that appeared...

Private Sub Worksheet_Change(ByVal Target As Range)
Const TargetAddresses As String = "A1:A10"
Const ColumnOffsetFromTarget As Long = 1
Const RowOffsetFromTarget As Long = 0
Dim T As Range, R As Range
Set T = Intersect(Target, Range(TargetAddresses))
If Not T Is Nothing Then
For Each R In T
With R.Offset(RowOffsetFromTarget, ColumnOffsetFromTarget)
.Clear
If IsDate(R.Value) Then
.Value = "Date Signed" & vbLf & Format(R.Value, "mm/dd/yy")
.Characters(1, 11).Font.Size = 8
.Characters(13).Font.Size = 12
End If
End With
Next
End If
End Sub

Change the assigned values in the three Const statements located at the
beginning of the code to reflect your actual conditions. The TargetAddresses
is the address or addresses for the cell or cells that will contain the date
entries. The ColumnOffsetFromTarget is the number of columns offset to the
cell where the "Date Signed..." text is to go. The RowOffsetFromTarget is
the number of rows offset to the cell where the "Date Signed..." text is to
go. So, for example, is the valid range of cells that can get a date entry
is A1:A10 and you put a date in A3, then using the example numbers I set in
the Const statements, its "Date Signed..." text would be placed in B3

--
Rick (MVP - Excel)


"briancrosier" wrote in message
...
I am currently tring to format a form to look how I would like it to. I
have
run into a problem. the current cell has the has a formula

=""Date Signed[Alt+Enter]"&TEXT(A1,"MM/DD/YY")

I currently have the cell font at an 8, which is what I would like the
Date
Signed text to show, however I would like the date that I bring in to be
at a
12 font on the next line. Can I set the format in the text command to
resize
the text, or is there another way to do this?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula to return part of a text string luvthavodka Excel Discussion (Misc queries) 9 October 20th 08 05:27 PM
Extract part of a text string Martin B Excel Worksheet Functions 7 January 13th 08 04:36 PM
Omitting right part of text string klysell Excel Worksheet Functions 6 January 13th 08 12:59 PM
How do I extract part of a text string Brennan Excel Discussion (Misc queries) 2 November 28th 06 07:26 PM
removing part of text string to another cell jamie_k Excel Discussion (Misc queries) 2 July 24th 06 10:57 AM


All times are GMT +1. The time now is 08:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"