Hey Everyone . . .
Looking for some assistance on a formula or VBA. I have the below dataset and I am trying to automate the calculation of the running total. Basically, I need it to say, if the user stays the same, the processID stays the same, the client id is new, and the closed column is 0 the increment my running total. But if the same client comes up (row 4 for example) I don't want to increment my running total. Also, if closed is equal to 1 I need to decrease the running total appropriately, so for the first 3 rows I see the total go from 0 to 1 to 2 to 3, but on the third row they closed, so I need to the running total at 2. Thoughts?
thanks!
[TABLE="class: grid, width: 357, align: left"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD]User[/TD]
[TD]Closed [/TD]
[TD]ClientID[/TD]
[TD]processID[/TD]
[TD]Running Total[/TD]
[/TR]
[TR]
[TD]User1[/TD]
[TD]0[/TD]
[TD]8753053[/TD]
[TD]8696[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]User1[/TD]
[TD]0[/TD]
[TD]10193883[/TD]
[TD]8696[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]User1[/TD]
[TD]1[/TD]
[TD]4905128[/TD]
[TD]8696[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]User1[/TD]
[TD]0[/TD]
[TD]10193883[/TD]
[TD]8696[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]User1[/TD]
[TD]1[/TD]
[TD]6738817[/TD]
[TD]8696[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]User1[/TD]
[TD]1[/TD]
[TD]10193883[/TD]
[TD]8696[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]User1[/TD]
[TD]0[/TD]
[TD]10193883[/TD]
[TD]8696[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]User1[/TD]
[TD]0[/TD]
[TD]10066793[/TD]
[TD]8696[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]User1[/TD]
[TD]1[/TD]
[TD]10066793[/TD]
[TD]8696[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]User1[/TD]
[TD]1[/TD]
[TD]10193883[/TD]
[TD]8696[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]
Looking for some assistance on a formula or VBA. I have the below dataset and I am trying to automate the calculation of the running total. Basically, I need it to say, if the user stays the same, the processID stays the same, the client id is new, and the closed column is 0 the increment my running total. But if the same client comes up (row 4 for example) I don't want to increment my running total. Also, if closed is equal to 1 I need to decrease the running total appropriately, so for the first 3 rows I see the total go from 0 to 1 to 2 to 3, but on the third row they closed, so I need to the running total at 2. Thoughts?
thanks!
[TABLE="class: grid, width: 357, align: left"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD]User[/TD]
[TD]Closed [/TD]
[TD]ClientID[/TD]
[TD]processID[/TD]
[TD]Running Total[/TD]
[/TR]
[TR]
[TD]User1[/TD]
[TD]0[/TD]
[TD]8753053[/TD]
[TD]8696[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]User1[/TD]
[TD]0[/TD]
[TD]10193883[/TD]
[TD]8696[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]User1[/TD]
[TD]1[/TD]
[TD]4905128[/TD]
[TD]8696[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]User1[/TD]
[TD]0[/TD]
[TD]10193883[/TD]
[TD]8696[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]User1[/TD]
[TD]1[/TD]
[TD]6738817[/TD]
[TD]8696[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]User1[/TD]
[TD]1[/TD]
[TD]10193883[/TD]
[TD]8696[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]User1[/TD]
[TD]0[/TD]
[TD]10193883[/TD]
[TD]8696[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]User1[/TD]
[TD]0[/TD]
[TD]10066793[/TD]
[TD]8696[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]User1[/TD]
[TD]1[/TD]
[TD]10066793[/TD]
[TD]8696[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]User1[/TD]
[TD]1[/TD]
[TD]10193883[/TD]
[TD]8696[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]