Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Use custom format to add text to a text entry.
How might I place a text string in a cell such as "Bell & Howell", and
have the cells contents display: "CUSTOMER: Bell & Howell". Looks like custom format requires a number. Usine Excel 2003. TIA for your thoughts. Pierre |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Use custom format to add text to a text entry.
The following OnChange event procedure in your sheet can do this.
Private Sub Worksheet_Change(ByVal Target As Range) If __cond__ Then Application.EnableEvents = False Target.Value = "CUSTOMER: " & Target.Value Application.EnableEvents = True End If End Sub Important: __cond__: It will be a condition that tests if this is a cell in which you want the autochange. Depending on which cells you want this to hold for the condition will change. If you want this to hold for the entire sheet just remove the If line and the End If line. To install: right-click on the sheet tab. Choose View Code... In the resulting window paste the above code. Example condition: If not intersect(target,range("A:C") is nothing then This will only allow the code to fire for cells in columns A:C Does this help? Write back for exact condition if necessary. HTH Kostis Vezerides Pierre wrote: How might I place a text string in a cell such as "Bell & Howell", and have the cells contents display: "CUSTOMER: Bell & Howell". Looks like custom format requires a number. Usine Excel 2003. TIA for your thoughts. Pierre |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Use custom format to add text to a text entry.
vezerid wrote: The following OnChange event procedure in your sheet can do this. Private Sub Worksheet_Change(ByVal Target As Range) If __cond__ Then Application.EnableEvents = False Target.Value = "CUSTOMER: " & Target.Value Application.EnableEvents = True End If End Sub Important: __cond__: It will be a condition that tests if this is a cell in which you want the autochange. Depending on which cells you want this to hold for the condition will change. If you want this to hold for the entire sheet just remove the If line and the End If line. To install: right-click on the sheet tab. Choose View Code... In the resulting window paste the above code. Example condition: If not intersect(target,range("A:C") is nothing then This will only allow the code to fire for cells in columns A:C Does this help? Write back for exact condition if necessary. HTH Kostis Vezerides Kostis: Thank you for the reply, still a little fuzzy. . . Need it to fire in cell E3 (Other texts in different cells, but I can get there once I load this one.) Thanks again. Pierre |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Use custom format to add text to a text entry.
Use the custom number format:
"Customer: "@ |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Use custom format to add text to a text entry.
Lori wrote: Use the custom number format: "Customer: "@ Got both working fine. Thanks so much. Pierre |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conversion to Text file format error | Excel Discussion (Misc queries) | |||
Convert Text Entry to Date Format | Excel Discussion (Misc queries) | |||
Custom format with text | Excel Discussion (Misc queries) | |||
Formulas dealing with text data | Excel Worksheet Functions | |||
Keep custom format in new worksheet | Excel Discussion (Misc queries) |