Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 271
Default update cell without loosing previous data

My stock sheets are set up with a goods inwards colum. Every delivery I enter
my invoices into a goods recived colum. So the first entry is =2. Next entry
the following week I select the cell wich now has (=2) and in the tool bar
place the curser next to the 2 and type plus then the next entry. So =2+3.
and get a running total. Can ayone tell me how I can eliminate the need to
place the curser in the window and just select the cell and begin to type
updated data.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 47
Default update cell without loosing previous data

you could just double click on the cell and the do the + bit at the end of
the current formula,, but this would have the same effect as clicikng on the
formula bar



"Susan" wrote:

My stock sheets are set up with a goods inwards colum. Every delivery I enter
my invoices into a goods recived colum. So the first entry is =2. Next entry
the following week I select the cell wich now has (=2) and in the tool bar
place the curser next to the 2 and type plus then the next entry. So =2+3.
and get a running total. Can ayone tell me how I can eliminate the need to
place the curser in the window and just select the cell and begin to type
updated data.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default update cell without loosing previous data

One way:

Assume your goods inward column is column C. Put this in your worksheet
code module (right-click the worksheet tab and choose View Code):

Const nCOLUMN As Long = 3 'Column C
Dim sOldFormula As String

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If ActiveCell.Column = nCOLUMN Then
sOldFormula = ActiveCell.Formula
Else
sOldFormula = vbNullString
End If
End Sub

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If .Column = nCOLUMN Then
If .HasFormula Then Exit Sub 'already a formula
If IsNumeric(.Value) Then
On Error Resume Next
Application.EnableEvents = False
If Left(sOldFormula, 1) = "=" Then
.Formula = sOldFormula & "+" & .Value
Else
.Formula = "=" & .Value
End If
Application.EnableEvents = True
On Error GoTo 0
End If
sOldFormula = .Formula
End If
End With
End Sub

Change nCOLUMN to suit.

In article ,
Susan wrote:

My stock sheets are set up with a goods inwards colum. Every delivery I enter
my invoices into a goods recived colum. So the first entry is =2. Next entry
the following week I select the cell wich now has (=2) and in the tool bar
place the curser next to the 2 and type plus then the next entry. So =2+3.
and get a running total. Can ayone tell me how I can eliminate the need to
place the curser in the window and just select the cell and begin to type
updated data.

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
Find first previous cell with data Nancy Newburger New Users to Excel 3 August 10th 06 09:10 PM
How?Create master worksheet xls that will update previous records ABC Excel Discussion (Misc queries) 0 June 29th 06 03:28 PM
Add data to cell w/o loosing initial data jaycain Excel Discussion (Misc queries) 2 March 29th 05 02:23 AM
Hide Cell Content if no data in previous columns Sherry Excel Discussion (Misc queries) 4 February 21st 05 07:27 PM
How would I fill blank cells with the data from a previous cell? Clive Darling Excel Discussion (Misc queries) 3 January 6th 05 01:10 AM


All times are GMT +1. The time now is 05:26 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"