+ Reply to Thread
Results 1 to 9 of 9

Data input in cells

  1. #1
    RichP
    Guest

    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. #2
    Don Guillett
    Guest

    Re: Data input in cells

    here is one I have used for numbers modified for text.
    right click sheet tab>view code>insert 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
    dguillett1@austin.rr.com
    "RichP" <RichP@discussions.microsoft.com> wrote in message
    news:F67462E2-40E2-41EE-A078-757C3FFB20F9@microsoft.com...
    >
    > 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. #3
    Don Guillett
    Guest

    Re: 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
    dguillett1@austin.rr.com
    "Don Guillett" <dguillett1@austin.rr.com> wrote in message
    news:%23U%231HupSGHA.5884@TK2MSFTNGP14.phx.gbl...
    > here is one I have used for numbers modified for text.
    > right click sheet tab>view code>insert 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
    > dguillett1@austin.rr.com
    > "RichP" <RichP@discussions.microsoft.com> wrote in message
    > news:F67462E2-40E2-41EE-A078-757C3FFB20F9@microsoft.com...
    >>
    >> 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. #4
    Jim May
    Guest

    Re: 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" <dguillett1@austin.rr.com> wrote in message
    news:%23U%231HupSGHA.5884@TK2MSFTNGP14.phx.gbl...
    > here is one I have used for numbers modified for text.
    > right click sheet tab>view code>insert 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
    > dguillett1@austin.rr.com
    > "RichP" <RichP@discussions.microsoft.com> wrote in message
    > news:F67462E2-40E2-41EE-A078-757C3FFB20F9@microsoft.com...
    >>
    >> 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. #5
    Don Guillett
    Guest

    Re: Data input in cells

    Look at my last post

    --
    Don Guillett
    SalesAid Software
    dguillett1@austin.rr.com
    "Jim May" <jmay@cox.net> 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" <dguillett1@austin.rr.com> wrote in message
    > news:%23U%231HupSGHA.5884@TK2MSFTNGP14.phx.gbl...
    >> here is one I have used for numbers modified for text.
    >> right click sheet tab>view code>insert 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
    >> dguillett1@austin.rr.com
    >> "RichP" <RichP@discussions.microsoft.com> wrote in message
    >> news:F67462E2-40E2-41EE-A078-757C3FFB20F9@microsoft.com...
    >>>
    >>> 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. #6
    Jim May
    Guest

    Re: 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" <dguillett1@austin.rr.com> wrote in message
    news:umn7GIqSGHA.1728@TK2MSFTNGP11.phx.gbl...
    > Look at my last post
    >
    > --
    > Don Guillett
    > SalesAid Software
    > dguillett1@austin.rr.com
    > "Jim May" <jmay@cox.net> 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" <dguillett1@austin.rr.com> wrote in message
    >> news:%23U%231HupSGHA.5884@TK2MSFTNGP14.phx.gbl...
    >>> here is one I have used for numbers modified for text.
    >>> right click sheet tab>view code>insert 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
    >>> dguillett1@austin.rr.com
    >>> "RichP" <RichP@discussions.microsoft.com> wrote in message
    >>> news:F67462E2-40E2-41EE-A078-757C3FFB20F9@microsoft.com...
    >>>>
    >>>> 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. #7
    Don Guillett
    Guest

    Re: 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
    dguillett1@austin.rr.com
    "Jim May" <jmay@cox.net> 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" <dguillett1@austin.rr.com> wrote in message
    > news:umn7GIqSGHA.1728@TK2MSFTNGP11.phx.gbl...
    >> Look at my last post
    >>
    >> --
    >> Don Guillett
    >> SalesAid Software
    >> dguillett1@austin.rr.com
    >> "Jim May" <jmay@cox.net> 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" <dguillett1@austin.rr.com> wrote in message
    >>> news:%23U%231HupSGHA.5884@TK2MSFTNGP14.phx.gbl...
    >>>> here is one I have used for numbers modified for text.
    >>>> right click sheet tab>view code>insert 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
    >>>> dguillett1@austin.rr.com
    >>>> "RichP" <RichP@discussions.microsoft.com> wrote in message
    >>>> news:F67462E2-40E2-41EE-A078-757C3FFB20F9@microsoft.com...
    >>>>>
    >>>>> 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. #8
    Jim May
    Guest

    Re: Data input in cells

    Great,
    Thanks for your input.
    Jim

    "Don Guillett" <dguillett1@austin.rr.com> wrote in message
    news:OLTScaqSGHA.5468@TK2MSFTNGP14.phx.gbl...
    > 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
    > dguillett1@austin.rr.com
    > "Jim May" <jmay@cox.net> 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" <dguillett1@austin.rr.com> wrote in message
    >> news:umn7GIqSGHA.1728@TK2MSFTNGP11.phx.gbl...
    >>> Look at my last post
    >>>
    >>> --
    >>> Don Guillett
    >>> SalesAid Software
    >>> dguillett1@austin.rr.com
    >>> "Jim May" <jmay@cox.net> 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" <dguillett1@austin.rr.com> wrote in message
    >>>> news:%23U%231HupSGHA.5884@TK2MSFTNGP14.phx.gbl...
    >>>>> here is one I have used for numbers modified for text.
    >>>>> right click sheet tab>view code>insert 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
    >>>>> dguillett1@austin.rr.com
    >>>>> "RichP" <RichP@discussions.microsoft.com> wrote in message
    >>>>> news:F67462E2-40E2-41EE-A078-757C3FFB20F9@microsoft.com...
    >>>>>>
    >>>>>> 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. #9
    Don Guillett
    Guest

    Re: Data input in cells

    glad to help

    --
    Don Guillett
    SalesAid Software
    dguillett1@austin.rr.com
    "Jim May" <jmay@cox.net> wrote in message
    news:e7kTf.270785$oG.30308@dukeread02...
    > Great,
    > Thanks for your input.
    > Jim
    >
    > "Don Guillett" <dguillett1@austin.rr.com> wrote in message
    > news:OLTScaqSGHA.5468@TK2MSFTNGP14.phx.gbl...
    >> 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
    >> dguillett1@austin.rr.com
    >> "Jim May" <jmay@cox.net> 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" <dguillett1@austin.rr.com> wrote in message
    >>> news:umn7GIqSGHA.1728@TK2MSFTNGP11.phx.gbl...
    >>>> Look at my last post
    >>>>
    >>>> --
    >>>> Don Guillett
    >>>> SalesAid Software
    >>>> dguillett1@austin.rr.com
    >>>> "Jim May" <jmay@cox.net> 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" <dguillett1@austin.rr.com> wrote in message
    >>>>> news:%23U%231HupSGHA.5884@TK2MSFTNGP14.phx.gbl...
    >>>>>> here is one I have used for numbers modified for text.
    >>>>>> right click sheet tab>view code>insert 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
    >>>>>> dguillett1@austin.rr.com
    >>>>>> "RichP" <RichP@discussions.microsoft.com> wrote in message
    >>>>>> news:F67462E2-40E2-41EE-A078-757C3FFB20F9@microsoft.com...
    >>>>>>>
    >>>>>>> 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1