Use custom format to add text to a text entry.

P

Pierre

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
 
V

vezerid

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
 
P

Pierre

vezerid said:
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
 

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