danilobiccari
New Member
- Joined
- Feb 22, 2018
- Messages
- 3
Hello,
I am trying to record a macro that can automate the following process:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]DATE[/TD]
[TD]TOTAL[/TD]
[TD]1-Sep-16[/TD]
[TD]TOTAL (based indirectly on C1)[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD]2-Sep-16[/TD]
[TD]TOTAL (based indirectly on C2)[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD]3-Sep-16[/TD]
[TD]TOTAL (based indirectly on C3)[/TD]
[/TR]
[TR]
[TD]...[/TD]
[TD][/TD]
[TD][/TD]
[TD]30-Dec-17[/TD]
[TD]...[/TD]
[/TR]
</tbody>[/TABLE]
1. Change the DATE in A1 to the date in C1
2. Copy the TOTAL in B1 (a number based on the date in A1) to cell D1
3. Change the DATE in A1 to the date in C2
4. Copy the TOTAL in B1 to cell D2
5. Change the DATE in A1 to the date in C3
6. Copy the TOTAL in B1 to cell D3
... (etc.)
How do I go about doing this? I am having difficulty in keeping some cells as static and some as dynamic in this macro.
Any assistance would be greatly appreciated!
Thanks,
Danilo
I am trying to record a macro that can automate the following process:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]DATE[/TD]
[TD]TOTAL[/TD]
[TD]1-Sep-16[/TD]
[TD]TOTAL (based indirectly on C1)[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD]2-Sep-16[/TD]
[TD]TOTAL (based indirectly on C2)[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD]3-Sep-16[/TD]
[TD]TOTAL (based indirectly on C3)[/TD]
[/TR]
[TR]
[TD]...[/TD]
[TD][/TD]
[TD][/TD]
[TD]30-Dec-17[/TD]
[TD]...[/TD]
[/TR]
</tbody>[/TABLE]
1. Change the DATE in A1 to the date in C1
2. Copy the TOTAL in B1 (a number based on the date in A1) to cell D1
3. Change the DATE in A1 to the date in C2
4. Copy the TOTAL in B1 to cell D2
5. Change the DATE in A1 to the date in C3
6. Copy the TOTAL in B1 to cell D3
... (etc.)
How do I go about doing this? I am having difficulty in keeping some cells as static and some as dynamic in this macro.
Any assistance would be greatly appreciated!
Thanks,
Danilo