ChaserQwerty

New Member
Joined
Oct 4, 2017
Messages
7
Looking for VBA help to complete this task...

Goal is to copy and past from cells into a templet, print a defined area with this information then repeat until there is a blank cell.

The macro for doing 1 row of information looks like this...
How do I get the macro to loop until there is nothing in column A?



Row/ColumnABC D
16MNSNCode-128 MNCode-128 SN
17H8251235T0B375123654789ÑHÌrS7Í5T0B3750ÓÒ,DVnÍ9mÓ
18H8251235T0B376123654789ÑHÌrS7Í5T0B376=ÓÒ,DVnÍ9mÓ
19H8251235T0B377123654789ÑHÌrS7Í5T0B377JÓÒ,DVnÍ9mÓ

<colgroup><col><col><col><col><col></colgroup><tbody>
</tbody>




Sub Macro1()
' Macro1 Macro
Range("A17").Select
Selection.Copy
Range("A1:D2").Select
ActiveSheet.Paste
Range("B17").Select
Application.CutCopyMode = False
Selection.Copy
Range("A7:D8").Select
ActiveSheet.Paste
Range("C17").Select
Application.CutCopyMode = False
Selection.Copy
Range("A3:D4").Select
ActiveSheet.Paste
Range("D17").Select
Application.CutCopyMode = False
Selection.Copy
Range("A9:D10").Select
ActiveSheet.Paste
Range("A1:D10").Select
Application.CutCopyMode = False
ActiveSheet.PageSetup.PrintArea = "$A$1:$D$10"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
End Sub
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
How about
Code:
Sub Macro1()

   Dim Cnt As Long
      
   ActiveSheet.PageSetup.PrintArea = "$A$1:$D$10"

   For Cnt = 17 To Range("A" & Rows.Count).End(xlUp).Row
      Range("A" & Cnt).Copy Range("A1:D2")
      Range("B" & Cnt).Copy Range("A7:D8")
      Range("C" & Cnt).Copy Range("A3:D4")
      Range("D" & Cnt).Copy Range("A9:D10")
      ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
         IgnorePrintAreas:=False
      Range("A1:D10").ClearContents
   Next Cnt
End Sub
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,216,084
Messages
6,128,730
Members
449,465
Latest member
TAKLAM

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top