Nerdalert314
New Member
- Joined
- Mar 28, 2018
- Messages
- 23
Good afternoon,
I am trying to create a Macro to add a blank cell in-between line. Every month when we do this there is no way to know how many lines we will have. Manually doing these I do the following:
Number the cells next to the date and auto fill all the way down. Copy the numbers. Paste them directly under the last number. Filter smallest to largest. I have included an example below that you can hopefully follow along with. Any suggestions would be great. Thank you!
[TABLE="width: 412"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]SAMPLE 1[/TD]
[TD][/TD]
[TD]X # OF CELLS[/TD]
[/TR]
[TR]
[TD]SAMPLE 2[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 3[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 4[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 5[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 6[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 7[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 8[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 9[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 10[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]SAMPLE 1[/TD]
[TD="align: right"]1[/TD]
[TD] # THE CELLS WITH AUTOFILL[/TD]
[/TR]
[TR]
[TD]SAMPLE 2[/TD]
[TD="align: right"]2[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 3[/TD]
[TD="align: right"]3[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 4[/TD]
[TD="align: right"]4[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 5[/TD]
[TD="align: right"]5[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 6[/TD]
[TD="align: right"]6[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 7[/TD]
[TD="align: right"]7[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 8[/TD]
[TD="align: right"]8[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 9[/TD]
[TD="align: right"]9[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 10[/TD]
[TD="align: right"]10[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]SAMPLE 1[/TD]
[TD="align: right"]1[/TD]
[TD] Paste the # under the last #[/TD]
[/TR]
[TR]
[TD]SAMPLE 2[/TD]
[TD="align: right"]2[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 3[/TD]
[TD="align: right"]3[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 4[/TD]
[TD="align: right"]4[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 5[/TD]
[TD="align: right"]5[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 6[/TD]
[TD="align: right"]6[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 7[/TD]
[TD="align: right"]7[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 8[/TD]
[TD="align: right"]8[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 9[/TD]
[TD="align: right"]9[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 10[/TD]
[TD="align: right"]10[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]3[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]4[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]5[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]6[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]7[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]8[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]9[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]10[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]SAMPLE 1[/TD]
[TD="align: right"]1[/TD]
[TD] Sort smallest to largest by column B[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 2[/TD]
[TD="align: right"]2[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 3[/TD]
[TD="align: right"]3[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]3[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 4[/TD]
[TD="align: right"]4[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]4[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 5[/TD]
[TD="align: right"]5[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]5[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 6[/TD]
[TD="align: right"]6[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]6[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 7[/TD]
[TD="align: right"]7[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]7[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 8[/TD]
[TD="align: right"]8[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]8[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 9[/TD]
[TD="align: right"]9[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]9[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 10[/TD]
[TD="align: right"]10[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]10[/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]
I am trying to create a Macro to add a blank cell in-between line. Every month when we do this there is no way to know how many lines we will have. Manually doing these I do the following:
Number the cells next to the date and auto fill all the way down. Copy the numbers. Paste them directly under the last number. Filter smallest to largest. I have included an example below that you can hopefully follow along with. Any suggestions would be great. Thank you!
[TABLE="width: 412"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]SAMPLE 1[/TD]
[TD][/TD]
[TD]X # OF CELLS[/TD]
[/TR]
[TR]
[TD]SAMPLE 2[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 3[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 4[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 5[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 6[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 7[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 8[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 9[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 10[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]SAMPLE 1[/TD]
[TD="align: right"]1[/TD]
[TD] # THE CELLS WITH AUTOFILL[/TD]
[/TR]
[TR]
[TD]SAMPLE 2[/TD]
[TD="align: right"]2[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 3[/TD]
[TD="align: right"]3[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 4[/TD]
[TD="align: right"]4[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 5[/TD]
[TD="align: right"]5[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 6[/TD]
[TD="align: right"]6[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 7[/TD]
[TD="align: right"]7[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 8[/TD]
[TD="align: right"]8[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 9[/TD]
[TD="align: right"]9[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 10[/TD]
[TD="align: right"]10[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]SAMPLE 1[/TD]
[TD="align: right"]1[/TD]
[TD] Paste the # under the last #[/TD]
[/TR]
[TR]
[TD]SAMPLE 2[/TD]
[TD="align: right"]2[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 3[/TD]
[TD="align: right"]3[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 4[/TD]
[TD="align: right"]4[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 5[/TD]
[TD="align: right"]5[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 6[/TD]
[TD="align: right"]6[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 7[/TD]
[TD="align: right"]7[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 8[/TD]
[TD="align: right"]8[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 9[/TD]
[TD="align: right"]9[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 10[/TD]
[TD="align: right"]10[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]3[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]4[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]5[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]6[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]7[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]8[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]9[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]10[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]SAMPLE 1[/TD]
[TD="align: right"]1[/TD]
[TD] Sort smallest to largest by column B[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 2[/TD]
[TD="align: right"]2[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 3[/TD]
[TD="align: right"]3[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]3[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 4[/TD]
[TD="align: right"]4[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]4[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 5[/TD]
[TD="align: right"]5[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]5[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 6[/TD]
[TD="align: right"]6[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]6[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 7[/TD]
[TD="align: right"]7[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]7[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 8[/TD]
[TD="align: right"]8[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]8[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 9[/TD]
[TD="align: right"]9[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]9[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]SAMPLE 10[/TD]
[TD="align: right"]10[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]10[/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]