ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Help with decision (https://www.excelbanter.com/excel-discussion-misc-queries/160107-help-decision.html)

smeldawg

Help with decision
 
I want to create something that will track the ammount of files that are
received by employees. It needs to be perpetual. I am not sure how to do
this. Please advise.

Thanks
Drock-13

Gary''s Student

Help with decision
 
Assume that you know whenever an employee receives a file.

list the employee names in column A

Enter the following macro in the worksheet code area:

Private Sub Worksheet_Change(ByVal Target As Range)
Set r = Range("B:B")
If Intersect(Target, r) Is Nothing Then Exit Sub
Application.EnableEvents = False
Set t = Target.Offset(0, 1)
t.Value = t.Value + Target.Value
Application.EnableEvents = True
End Sub

just enter the number of files received in column B. Column C will
automatically update with the new accumulated value.

For example Joe is row 1. Joe receives 3 files. You type 3 in cell B1 and
cell C1 automatically becomes 3. Tomorrow Joe receives 16 more files. You
type 16 in cell B1 and cell C1 updates automatically to 19.


It is perpetual because it only uses 3 columns.
--
Gary''s Student - gsnu200747


"smeldawg" wrote:

I want to create something that will track the ammount of files that are
received by employees. It needs to be perpetual. I am not sure how to do
this. Please advise.

Thanks
Drock-13



All times are GMT +1. The time now is 09:15 AM.

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