Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default Cell format and Calculation

I want to enter a number into a cell and this number will automatically add
its value into another cell. However, after the pressing the enter key, I
want the entered number to be disappeared, leaving room for the next number.
How can I accomplish this? Or is this possible?


  #2   Report Post  
Posted to microsoft.public.excel.charting,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 923
Default Cell format and Calculation

Try putting this into the worksheet code where you want this to occur, the
input cell is A1 the summation cell is B1

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("A1").Value 0 Then
Range("B1").Value = Range("B1").Value + Range("A1").Value
Range("A1").Value = ""
End If
End Sub

Cheers
Nigel

"Raymond" wrote in message
...
I want to enter a number into a cell and this number will automatically

add
its value into another cell. However, after the pressing the enter key, I
want the entered number to be disappeared, leaving room for the next

number.
How can I accomplish this? Or is this possible?




  #3   Report Post  
Posted to microsoft.public.excel.charting,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default Cell format and Calculation

I am not a programer. How do it open the cell code and put this in there?
Thanks.


"Nigel" wrote in message
...
Try putting this into the worksheet code where you want this to occur, the
input cell is A1 the summation cell is B1

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("A1").Value 0 Then
Range("B1").Value = Range("B1").Value + Range("A1").Value
Range("A1").Value = ""
End If
End Sub

Cheers
Nigel

"Raymond" wrote in message
...
I want to enter a number into a cell and this number will automatically

add
its value into another cell. However, after the pressing the enter key,

I
want the entered number to be disappeared, leaving room for the next

number.
How can I accomplish this? Or is this possible?






  #4   Report Post  
Posted to microsoft.public.excel.charting,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 923
Default Cell format and Calculation

From Excel press Alt-F11 to open the VBA editor. Then press Ctrl R to open
the Project Viewer. This lists the object in the workbook. Double Click
the worksheet into which you wish to apply this programme. Paste the entire
code in the new window that opended. Close the VBA editor and try it. You
can edit the cells etc., by re-opening the code as above and changing the
range values A1 and B1 as required.


Cheers
Nigel


"Raymond" wrote in message
...
I am not a programer. How do it open the cell code and put this in there?
Thanks.


"Nigel" wrote in message
...
Try putting this into the worksheet code where you want this to occur,

the
input cell is A1 the summation cell is B1

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("A1").Value 0 Then
Range("B1").Value = Range("B1").Value + Range("A1").Value
Range("A1").Value = ""
End If
End Sub

Cheers
Nigel

"Raymond" wrote in message
...
I want to enter a number into a cell and this number will

automatically
add
its value into another cell. However, after the pressing the enter

key,
I
want the entered number to be disappeared, leaving room for the next

number.
How can I accomplish this? Or is this possible?








  #5   Report Post  
Posted to microsoft.public.excel.charting,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27,285
Default Cell format and Calculation

and if you make a mistake entering the number, what do you want to have
happen (if you forget what number you entered; but you know it is wrong,
then what). Generally a running total with no audit trail can be
problematic.

--
Regards,
Tom Ogilvy

"Raymond" wrote in message
...
I am not a programer. How do it open the cell code and put this in there?
Thanks.


"Nigel" wrote in message
...
Try putting this into the worksheet code where you want this to occur,

the
input cell is A1 the summation cell is B1

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("A1").Value 0 Then
Range("B1").Value = Range("B1").Value + Range("A1").Value
Range("A1").Value = ""
End If
End Sub

Cheers
Nigel

"Raymond" wrote in message
...
I want to enter a number into a cell and this number will

automatically
add
its value into another cell. However, after the pressing the enter

key,
I
want the entered number to be disappeared, leaving room for the next

number.
How can I accomplish this? Or is this possible?










  #6   Report Post  
Posted to microsoft.public.excel.charting,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 70
Default Cell format and Calculation

It's easier to right click on the sheet tab, select View Code, and pop
the macro in there.

Pay heed to Tom's astute observation, as well.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Nigel wrote:

From Excel press Alt-F11 to open the VBA editor. Then press Ctrl R to open
the Project Viewer. This lists the object in the workbook. Double Click
the worksheet into which you wish to apply this programme. Paste the entire
code in the new window that opended. Close the VBA editor and try it. You
can edit the cells etc., by re-opening the code as above and changing the
range values A1 and B1 as required.


Cheers
Nigel


"Raymond" wrote in message
...

I am not a programer. How do it open the cell code and put this in there?
Thanks.


"Nigel" wrote in message
...

Try putting this into the worksheet code where you want this to occur,


the

input cell is A1 the summation cell is B1

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("A1").Value 0 Then
Range("B1").Value = Range("B1").Value + Range("A1").Value
Range("A1").Value = ""
End If
End Sub

Cheers
Nigel

"Raymond" wrote in message
...

I want to enter a number into a cell and this number will


automatically

add

its value into another cell. However, after the pressing the enter


key,

I

want the entered number to be disappeared, leaving room for the next

number.

How can I accomplish this? Or is this possible?








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
Calculation / Format Error Jim Excel Worksheet Functions 1 December 4th 09 05:45 AM
Cell format to use for calculation scott Excel Worksheet Functions 4 September 5th 08 02:58 PM
Calculation based on cell format results Japs Excel Discussion (Misc queries) 2 May 18th 07 08:42 PM
Hours calculation in 24h format LMC Excel Discussion (Misc queries) 10 January 19th 07 11:30 AM
format to calculation cell mdma Excel Discussion (Misc queries) 5 June 14th 05 07:55 PM


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