JayCheezey
New Member
- Joined
- Jul 25, 2014
- Messages
- 17
Hi everyone!
New coder here, I'm just wondering if I could get some help on some simple code.
I'm trying to create a macro that allows me to continuously get the sum of multiple weeks. Each time I run the macro, it adds one additional week. This is the tricky part as I'm not sure what I function I would use to continuously expand a sum formula.
For example, I run the macro, it sums W1 to W2 (=5). The next time I run the macro, it would sum W1 to W3 (=8). And after that sum W1 to W4 (=10)
[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[TD="align: center"]G[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]W1[/TD]
[TD="align: center"]W2[/TD]
[TD="align: center"]W3
[/TD]
[TD="align: center"]W4[/TD]
[TD="align: center"]W5[/TD]
[TD="align: center"]W6[/TD]
[TD="align: center"]W7[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]5[/TD]
[/TR]
</tbody>[/TABLE]
Thanks a lot in advance. This function is the last part of a large piece of code I'm trying to get done.
Much appreciated!
New coder here, I'm just wondering if I could get some help on some simple code.
I'm trying to create a macro that allows me to continuously get the sum of multiple weeks. Each time I run the macro, it adds one additional week. This is the tricky part as I'm not sure what I function I would use to continuously expand a sum formula.
For example, I run the macro, it sums W1 to W2 (=5). The next time I run the macro, it would sum W1 to W3 (=8). And after that sum W1 to W4 (=10)
[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[TD="align: center"]G[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]W1[/TD]
[TD="align: center"]W2[/TD]
[TD="align: center"]W3
[/TD]
[TD="align: center"]W4[/TD]
[TD="align: center"]W5[/TD]
[TD="align: center"]W6[/TD]
[TD="align: center"]W7[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]5[/TD]
[/TR]
</tbody>[/TABLE]
Thanks a lot in advance. This function is the last part of a large piece of code I'm trying to get done.
Much appreciated!
