Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ranking query | Excel Discussion (Misc queries) | |||
Macro to delete data in 'green' cells only | Excel Worksheet Functions | |||
How can I make the graph omit blank cells in the data set? | Charts and Charting in Excel | |||
how can I move cells after data input without using enter or tab | Excel Discussion (Misc queries) | |||
How do I copy data (word) into respective cells when the data bei. | New Users to Excel |