[TABLE="width: 1242"]
<tbody>[TR]
[TD][TABLE="width: 905"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Below is a sample of our payment register. Our check register prints the total of the check on the first line and then the account breakdown of the checks on the lines below. I need the check number and the Check Name to show up on every line of the account breakdown. I would like to create a macro that will copy the text from columns "A" and "B" and paste it to the rows below it that correspond to that particular check. I would like for the macro to continue copying the information until there are no more checks. This example has only three checks. Sometimes our payment registers have 50 checks or $100 checks. The number can vary. Can the macro continue to run until it detects no more checks in column "A"?
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Check Number[/TD]
[TD]Check Name[/TD]
[TD]Total Check Amount[/TD]
[TD]Account Split[/TD]
[TD]Amount per Account[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]100[/TD]
[TD]Sears[/TD]
[TD]$500[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]845[/TD]
[TD]$225[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]760[/TD]
[TD]$275[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]200[/TD]
[TD]Vons[/TD]
[TD]$2,500[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]260[/TD]
[TD]$500[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]375[/TD]
[TD]$1,400[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]460[/TD]
[TD]$600[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]300[/TD]
[TD]Best Buy[/TD]
[TD]$4000[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]720[/TD]
[TD]$4,000[/TD]
[/TR]
</tbody>[/TABLE]
The final result should look like the table below:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Check #[/TD]
[TD]Check Name[/TD]
[TD]Total Check[/TD]
[TD]Account Split[/TD]
[TD]Amount per Account[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]100[/TD]
[TD]Sears[/TD]
[TD]$500[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]100[/TD]
[TD]Sears[/TD]
[TD][/TD]
[TD]845[/TD]
[TD]$225[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]100[/TD]
[TD]Sears[/TD]
[TD][/TD]
[TD]760[/TD]
[TD]$275[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]200[/TD]
[TD]Vons[/TD]
[TD]$2,500[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]200[/TD]
[TD]Vons[/TD]
[TD][/TD]
[TD]260[/TD]
[TD]$500[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]200[/TD]
[TD]Vons[/TD]
[TD][/TD]
[TD]375[/TD]
[TD]$1,400[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]200[/TD]
[TD]Vons[/TD]
[TD][/TD]
[TD]460[/TD]
[TD]$600[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]300[/TD]
[TD]Best Buy[/TD]
[TD]$4000[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]300[/TD]
[TD]Best Buy[/TD]
[TD][/TD]
[TD]720[/TD]
[TD]$4,000[/TD]
[/TR]
</tbody>[/TABLE]
Thank you[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
<tbody>[TR]
[TD][TABLE="width: 905"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Below is a sample of our payment register. Our check register prints the total of the check on the first line and then the account breakdown of the checks on the lines below. I need the check number and the Check Name to show up on every line of the account breakdown. I would like to create a macro that will copy the text from columns "A" and "B" and paste it to the rows below it that correspond to that particular check. I would like for the macro to continue copying the information until there are no more checks. This example has only three checks. Sometimes our payment registers have 50 checks or $100 checks. The number can vary. Can the macro continue to run until it detects no more checks in column "A"?
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Check Number[/TD]
[TD]Check Name[/TD]
[TD]Total Check Amount[/TD]
[TD]Account Split[/TD]
[TD]Amount per Account[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]100[/TD]
[TD]Sears[/TD]
[TD]$500[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]845[/TD]
[TD]$225[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]760[/TD]
[TD]$275[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]200[/TD]
[TD]Vons[/TD]
[TD]$2,500[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]260[/TD]
[TD]$500[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]375[/TD]
[TD]$1,400[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]460[/TD]
[TD]$600[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]300[/TD]
[TD]Best Buy[/TD]
[TD]$4000[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]720[/TD]
[TD]$4,000[/TD]
[/TR]
</tbody>[/TABLE]
The final result should look like the table below:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Check #[/TD]
[TD]Check Name[/TD]
[TD]Total Check[/TD]
[TD]Account Split[/TD]
[TD]Amount per Account[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]100[/TD]
[TD]Sears[/TD]
[TD]$500[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]100[/TD]
[TD]Sears[/TD]
[TD][/TD]
[TD]845[/TD]
[TD]$225[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]100[/TD]
[TD]Sears[/TD]
[TD][/TD]
[TD]760[/TD]
[TD]$275[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]200[/TD]
[TD]Vons[/TD]
[TD]$2,500[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]200[/TD]
[TD]Vons[/TD]
[TD][/TD]
[TD]260[/TD]
[TD]$500[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]200[/TD]
[TD]Vons[/TD]
[TD][/TD]
[TD]375[/TD]
[TD]$1,400[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]200[/TD]
[TD]Vons[/TD]
[TD][/TD]
[TD]460[/TD]
[TD]$600[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]300[/TD]
[TD]Best Buy[/TD]
[TD]$4000[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]300[/TD]
[TD]Best Buy[/TD]
[TD][/TD]
[TD]720[/TD]
[TD]$4,000[/TD]
[/TR]
</tbody>[/TABLE]
Thank you[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Last edited by a moderator: