Hi,
I am wanting any help please. I need some help to speed up days worth of calculations by making a macro that will automatically provide a helper column with preset formulas on the first column that is empty. It will probably need an input box asking which column and row that I will be referencing as this may change. Generally my data starts in row 3 with row 2 as the header.
For example if choosing column A the macro will automatically create a helper column with the preset formula in the first empty column which is C:[TABLE="class: grid, width: 600"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD="align: center"]Car (mins)[/TD]
[TD="align: center"]Truck (mins)[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]12[/TD]
[TD]15[/TD]
[TD]=A3*15[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]10[/TD]
[TD]18[/TD]
[TD]=A4*15[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]6[/TD]
[TD][/TD]
[TD]=A5*15[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]8[/TD]
[TD][/TD]
[TD]=A6*15[/TD]
[/TR]
</tbody>[/TABLE]
Or if choosing column B the macro will create a helper column in C with the preset formula:
[TABLE="class: grid, width: 600"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD="align: center"]Car (mins)[/TD]
[TD="align: center"]Truck (mins)[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]12[/TD]
[TD]15[/TD]
[TD]=B3*15[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]10[/TD]
[TD]18[/TD]
[TD]=B4*15[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]8[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I assume I have to create a loop in the range and go down the row but I am far out of my depth.
Any help is appreciated!
Thanks
I am wanting any help please. I need some help to speed up days worth of calculations by making a macro that will automatically provide a helper column with preset formulas on the first column that is empty. It will probably need an input box asking which column and row that I will be referencing as this may change. Generally my data starts in row 3 with row 2 as the header.
For example if choosing column A the macro will automatically create a helper column with the preset formula in the first empty column which is C:[TABLE="class: grid, width: 600"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD="align: center"]Car (mins)[/TD]
[TD="align: center"]Truck (mins)[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]12[/TD]
[TD]15[/TD]
[TD]=A3*15[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]10[/TD]
[TD]18[/TD]
[TD]=A4*15[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]6[/TD]
[TD][/TD]
[TD]=A5*15[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]8[/TD]
[TD][/TD]
[TD]=A6*15[/TD]
[/TR]
</tbody>[/TABLE]
Or if choosing column B the macro will create a helper column in C with the preset formula:
[TABLE="class: grid, width: 600"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD="align: center"]Car (mins)[/TD]
[TD="align: center"]Truck (mins)[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]12[/TD]
[TD]15[/TD]
[TD]=B3*15[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]10[/TD]
[TD]18[/TD]
[TD]=B4*15[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]8[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I assume I have to create a loop in the range and go down the row but I am far out of my depth.
Any help is appreciated!
Thanks