I have a workbook that I am creating that does an analysis. The analysis can be done for 1 or 2 companies.
Rather than making changes manually (like adding columns to a worksheet), I would like to be able to type "1" or "2" in to a cell and have a code linked to that cell that will do the changes I need. This text box is located in cell E3 on a tab called "Instructions".
The first change I need is to add two columns to a worksheet.
When "2" is typed in to E3 on the "Instructions" tab, I need to duplicate columns I, J, K, L and paste them right after column L. Note: there is information in column M:Q. Below is an example of what my worksheet looks like (row 1 is the column letters, row 2 is the header names, row 3 is example data):
[TABLE="width: 500"]
<tbody>[TR]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[TD]L[/TD]
[TD]M[/TD]
[TD]N[/TD]
[TD]O[/TD]
[TD]P[/TD]
[TD]Q[/TD]
[/TR]
[TR]
[TD]Description[/TD]
[TD]Notes[/TD]
[TD]Depth[/TD]
[TD]Breadth[/TD]
[TD]Impact[/TD]
[TD]Score[/TD]
[TD]Rank[/TD]
[TD]Gap[/TD]
[TD]Avg.[/TD]
[TD]Bucket[/TD]
[/TR]
[TR]
[TD]TEXT TEXT TEXT[/TD]
[TD]TEXT TEXT[/TD]
[TD]3[/TD]
[TD]2[/TD]
[TD]1[/TD]
[TD]5[/TD]
[TD]4[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]A[/TD]
[/TR]
</tbody>[/TABLE]
I need the new table to look like this:
[TABLE="width: 500"]
<tbody>[TR]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[TD]L[/TD]
[TD]M[/TD]
[TD]N[/TD]
[TD]O[/TD]
[TD]P[/TD]
[TD]Q[/TD]
[TD]R[/TD]
[/TR]
[TR]
[TD]Description[/TD]
[TD]Notes[/TD]
[TD]Depth[/TD]
[TD]Breadth[/TD]
[TD]Impact[/TD]
[TD]Score[/TD]
[TD]Notes 2[/TD]
[TD]Depth 2[/TD]
[TD]Breadth 2[/TD]
[TD]Impact 2[/TD]
[TD]Score 2[/TD]
[/TR]
</tbody>[/TABLE]
Thanks!
Rather than making changes manually (like adding columns to a worksheet), I would like to be able to type "1" or "2" in to a cell and have a code linked to that cell that will do the changes I need. This text box is located in cell E3 on a tab called "Instructions".
The first change I need is to add two columns to a worksheet.
When "2" is typed in to E3 on the "Instructions" tab, I need to duplicate columns I, J, K, L and paste them right after column L. Note: there is information in column M:Q. Below is an example of what my worksheet looks like (row 1 is the column letters, row 2 is the header names, row 3 is example data):
[TABLE="width: 500"]
<tbody>[TR]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[TD]L[/TD]
[TD]M[/TD]
[TD]N[/TD]
[TD]O[/TD]
[TD]P[/TD]
[TD]Q[/TD]
[/TR]
[TR]
[TD]Description[/TD]
[TD]Notes[/TD]
[TD]Depth[/TD]
[TD]Breadth[/TD]
[TD]Impact[/TD]
[TD]Score[/TD]
[TD]Rank[/TD]
[TD]Gap[/TD]
[TD]Avg.[/TD]
[TD]Bucket[/TD]
[/TR]
[TR]
[TD]TEXT TEXT TEXT[/TD]
[TD]TEXT TEXT[/TD]
[TD]3[/TD]
[TD]2[/TD]
[TD]1[/TD]
[TD]5[/TD]
[TD]4[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]A[/TD]
[/TR]
</tbody>[/TABLE]
I need the new table to look like this:
[TABLE="width: 500"]
<tbody>[TR]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[TD]L[/TD]
[TD]M[/TD]
[TD]N[/TD]
[TD]O[/TD]
[TD]P[/TD]
[TD]Q[/TD]
[TD]R[/TD]
[/TR]
[TR]
[TD]Description[/TD]
[TD]Notes[/TD]
[TD]Depth[/TD]
[TD]Breadth[/TD]
[TD]Impact[/TD]
[TD]Score[/TD]
[TD]Notes 2[/TD]
[TD]Depth 2[/TD]
[TD]Breadth 2[/TD]
[TD]Impact 2[/TD]
[TD]Score 2[/TD]
[/TR]
</tbody>[/TABLE]
Thanks!