#1   Report Post  
Posted to microsoft.public.excel.misc
RichP
 
Posts: n/a
Default Data input in cells


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

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

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



  #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





  #4   Report Post  
Posted to microsoft.public.excel.misc
Jim May
 
Posts: n/a
Default Data input in cells

Don:

Can you expand on what this macro is doing?
If i enter in cell A5 This <<and return
then again with A5 the active cell I enter "is a test"
(without the quotes).. I get is a test
From what's being asked it seems the what should
be displayed is This is a test..
Confused, (all too often)..
TIA,



"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





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

Look at my last post

--
Don Guillett
SalesAid Software

"Jim May" wrote in message
news:SIVSf.250046$oG.219016@dukeread02...
Don:

Can you expand on what this macro is doing?
If i enter in cell A5 This <<and return
then again with A5 the active cell I enter "is a test"
(without the quotes).. I get is a test
From what's being asked it seems the what should
be displayed is This is a test..
Confused, (all too often)..
TIA,



"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









  #6   Report Post  
Posted to microsoft.public.excel.misc
Jim May
 
Posts: n/a
Default Data input in cells

Yeah,
Got it;
Only small glitch.. Currently
the " " is creating leading spaces.
Even when A5 is clear the =len(a5) = 1
This is good stuff (you've done).
TIA,
Jim

"Don Guillett" wrote in message
...
Look at my last post

--
Don Guillett
SalesAid Software

"Jim May" wrote in message
news:SIVSf.250046$oG.219016@dukeread02...
Don:

Can you expand on what this macro is doing?
If i enter in cell A5 This <<and return
then again with A5 the active cell I enter "is a test"
(without the quotes).. I get is a test
From what's being asked it seems the what should
be displayed is This is a test..
Confused, (all too often)..
TIA,



"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









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

this should fix all. Use either the delete key or spacebar to start over.

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 = ""
Else
Target.Value = Trim(oldvalue & " " & Target)
oldvalue = Target
End If
fixit:
Application.EnableEvents = True
End If
End Sub

--
Don Guillett
SalesAid Software

"Jim May" wrote in message
news:ZWVSf.250049$oG.87497@dukeread02...
Yeah,
Got it;
Only small glitch.. Currently
the " " is creating leading spaces.
Even when A5 is clear the =len(a5) = 1
This is good stuff (you've done).
TIA,
Jim

"Don Guillett" wrote in message
...
Look at my last post

--
Don Guillett
SalesAid Software

"Jim May" wrote in message
news:SIVSf.250046$oG.219016@dukeread02...
Don:

Can you expand on what this macro is doing?
If i enter in cell A5 This <<and return
then again with A5 the active cell I enter "is a test"
(without the quotes).. I get is a test
From what's being asked it seems the what should
be displayed is This is a test..
Confused, (all too often)..
TIA,



"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











  #8   Report Post  
Posted to microsoft.public.excel.misc
Jim May
 
Posts: n/a
Default Data input in cells

Great,
Thanks for your input.
Jim

"Don Guillett" wrote in message
...
this should fix all. Use either the delete key or spacebar to start over.

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 = ""
Else
Target.Value = Trim(oldvalue & " " & Target)
oldvalue = Target
End If
fixit:
Application.EnableEvents = True
End If
End Sub

--
Don Guillett
SalesAid Software

"Jim May" wrote in message
news:ZWVSf.250049$oG.87497@dukeread02...
Yeah,
Got it;
Only small glitch.. Currently
the " " is creating leading spaces.
Even when A5 is clear the =len(a5) = 1
This is good stuff (you've done).
TIA,
Jim

"Don Guillett" wrote in message
...
Look at my last post

--
Don Guillett
SalesAid Software

"Jim May" wrote in message
news:SIVSf.250046$oG.219016@dukeread02...
Don:

Can you expand on what this macro is doing?
If i enter in cell A5 This <<and return
then again with A5 the active cell I enter "is a test"
(without the quotes).. I get is a test
From what's being asked it seems the what should
be displayed is This is a test..
Confused, (all too often)..
TIA,



"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













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

glad to help

--
Don Guillett
SalesAid Software

"Jim May" wrote in message
news:e7kTf.270785$oG.30308@dukeread02...
Great,
Thanks for your input.
Jim

"Don Guillett" wrote in message
...
this should fix all. Use either the delete key or spacebar to start over.

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 = ""
Else
Target.Value = Trim(oldvalue & " " & Target)
oldvalue = Target
End If
fixit:
Application.EnableEvents = True
End If
End Sub

--
Don Guillett
SalesAid Software

"Jim May" wrote in message
news:ZWVSf.250049$oG.87497@dukeread02...
Yeah,
Got it;
Only small glitch.. Currently
the " " is creating leading spaces.
Even when A5 is clear the =len(a5) = 1
This is good stuff (you've done).
TIA,
Jim

"Don Guillett" wrote in message
...
Look at my last post

--
Don Guillett
SalesAid Software

"Jim May" wrote in message
news:SIVSf.250046$oG.219016@dukeread02...
Don:

Can you expand on what this macro is doing?
If i enter in cell A5 This <<and return
then again with A5 the active cell I enter "is a test"
(without the quotes).. I get is a test
From what's being asked it seems the what should
be displayed is This is a test..
Confused, (all too often)..
TIA,



"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















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
ranking query JaimeTimbrell Excel Discussion (Misc queries) 2 February 16th 06 08:09 AM
Macro to delete data in 'green' cells only Steve Excel Worksheet Functions 7 March 19th 05 01:40 PM
How can I make the graph omit blank cells in the data set? easy Charts and Charting in Excel 3 March 17th 05 02:48 PM
how can I move cells after data input without using enter or tab mull Excel Discussion (Misc queries) 1 March 2nd 05 05:53 PM
How do I copy data (word) into respective cells when the data bei. awg9tech New Users to Excel 1 January 12th 05 11:26 AM


All times are GMT +1. The time now is 04:07 AM.

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

About Us

"It's about Microsoft Excel"