View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett
 
Posts: n/a
Default Data input in cells

Use this instead so you can start over in that cell

Option Explicit
Dim oldvalue As String

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address = "$A$5" Then
On Error GoTo fixit
Application.EnableEvents = False
If Target = "" Or Target = " " Then oldvalue = ""
Target.Value = oldvalue & " " & Target.Value
oldvalue = Target.Value
fixit:
Application.EnableEvents = True
End If
End Sub

--
Don Guillett
SalesAid Software

"Don Guillett" wrote in message
...
here is one I have used for numbers modified for text.
right click sheet tabview codeinsert this

Option Explicit
Dim oldvalue As String

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address = "$A$5" Then
On Error GoTo fixit
Application.EnableEvents = False
'If Target.Value = 0 Then oldvalue = 0
'Target.Value = Target.Value & " " & oldvalue
oldvalue = Target.Value
fixit:
Application.EnableEvents = True
End If
End Sub


--
Don Guillett
SalesAid Software

"RichP" wrote in message
...

Hello everyone. We have the requirement to continually input text into a
cell, and have the ability to keep the existing data already there, and
just
add to it. The problem is once I have data in one cell, leave, and come
back
to add more data, it erases the previous information already within that
cell. I have tried the Merge cells function and other options within
Excel.
The data we are inputting is more text than numbers. We are using Excel
2003.

Thanks, Rich