ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Accumulating Multiple Inputs From a Single Cell (https://www.excelbanter.com/excel-discussion-misc-queries/239050-accumulating-multiple-inputs-single-cell.html)

don2712

Accumulating Multiple Inputs From a Single Cell
 
I am running XL 2007 and what I want to do is to be able to put a series of
different numbers into one individual cell and have them show as an
accumulated total in another.
The idea is to be able to produce a score system for a game with up to 6
people playing without having having to have long columns of input for each
player.
Each player would have a a single cell below their name to input their
scores during the game and adjacent to that another cell would display the
running total.
Any help would be appreciated.
Thank you




Don Guillett

Accumulating Multiple Inputs From a Single Cell
 
Right click sheet tabview codeinsert this. Now when you change a cell in
col b, col c will increase. Put the names in col A.

Private Sub Worksheet_Change(ByVal target As Excel.Range)
If Intersect(target, Range("b2:b22")) Is Nothing Then Exit Sub
Application.EnableEvents = False
target.Offset(, 1) = target.Value + target.Offset(, 1)
Application.EnableEvents = True
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"don2712" wrote in message
...
I am running XL 2007 and what I want to do is to be able to put a series of
different numbers into one individual cell and have them show as an
accumulated total in another.
The idea is to be able to produce a score system for a game with up to 6
people playing without having having to have long columns of input for
each
player.
Each player would have a a single cell below their name to input their
scores during the game and adjacent to that another cell would display the
running total.
Any help would be appreciated.
Thank you





don2712

Accumulating Multiple Inputs From a Single Cell
 
Thank you for your reply, I have never used the developer before so I'm
afraid I still have a couple of queries.
I typed the routine in exactly as it is here but line 4 starting
'target.Offset' seems to have a problem as it is being highlighted in yellow
however, as far as I can see everything seems to have been entered correctly.
Secondly, I do not know how to activate the routine once it has been
accepted by the developer.

"Don Guillett" wrote:

Right click sheet tabview codeinsert this. Now when you change a cell in
col b, col c will increase. Put the names in col A.

Private Sub Worksheet_Change(ByVal target As Excel.Range)
If Intersect(target, Range("b2:b22")) Is Nothing Then Exit Sub
Application.EnableEvents = False
target.Offset(, 1) = target.Value + target.Offset(, 1)
Application.EnableEvents = True
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"don2712" wrote in message
...
I am running XL 2007 and what I want to do is to be able to put a series of
different numbers into one individual cell and have them show as an
accumulated total in another.
The idea is to be able to produce a score system for a game with up to 6
people playing without having having to have long columns of input for
each
player.
Each player would have a a single cell below their name to input their
scores during the game and adjacent to that another cell would display the
running total.
Any help would be appreciated.
Thank you






Don Guillett

Accumulating Multiple Inputs From a Single Cell
 
All you should have had to do is follow my instructions to right click the
SHEET tabview codeCOPY/paste this instead of typing it in. Activating the
routine is AUTOMATIC when you enter a number in cells b2:b22 then number in
the column to the right will increase by the number entered. Pretty
simple....................

Private Sub Worksheet_Change(ByVal target As Excel.Range)
If Intersect(target, Range("b2:b22")) Is Nothing Then Exit Sub
Application.EnableEvents = False
target.Offset(, 1) = target.Value + target.Offset(, 1)
Application.EnableEvents = True
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"don2712" wrote in message
...
Thank you for your reply, I have never used the developer before so I'm
afraid I still have a couple of queries.
I typed the routine in exactly as it is here but line 4 starting
'target.Offset' seems to have a problem as it is being highlighted in
yellow
however, as far as I can see everything seems to have been entered
correctly.
Secondly, I do not know how to activate the routine once it has been
accepted by the developer.

"Don Guillett" wrote:

Right click sheet tabview codeinsert this. Now when you change a cell
in
col b, col c will increase. Put the names in col A.

Private Sub Worksheet_Change(ByVal target As Excel.Range)
If Intersect(target, Range("b2:b22")) Is Nothing Then Exit Sub
Application.EnableEvents = False
target.Offset(, 1) = target.Value + target.Offset(, 1)
Application.EnableEvents = True
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"don2712" wrote in message
...
I am running XL 2007 and what I want to do is to be able to put a series
of
different numbers into one individual cell and have them show as an
accumulated total in another.
The idea is to be able to produce a score system for a game with up to
6
people playing without having having to have long columns of input for
each
player.
Each player would have a a single cell below their name to input their
scores during the game and adjacent to that another cell would display
the
running total.
Any help would be appreciated.
Thank you







Gord Dibben

Accumulating Multiple Inputs From a Single Cell
 
Can be done per Don's code.

I would point out that there is no way of error checking this type of
operation.

There is no "paper trail" to show you when/if a mistake is made in data
entry.

Excel sheet has many cells............use them to input scores for each
player.


Gord Dibben MS Excel MVP

On Wed, 5 Aug 2009 16:36:01 -0700, don2712
wrote:

I am running XL 2007 and what I want to do is to be able to put a series of
different numbers into one individual cell and have them show as an
accumulated total in another.
The idea is to be able to produce a score system for a game with up to 6
people playing without having having to have long columns of input for each
player.
Each player would have a a single cell below their name to input their
scores during the game and adjacent to that another cell would display the
running total.
Any help would be appreciated.
Thank you





All times are GMT +1. The time now is 11:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com