Macro to print each row on list

newshound12

Active Member
I have a list of 200 five digit numbers.
Each digit of each number is in its own cell - AA:AE
So the range of all the numbers is AA1:AAE200

I need to place each digit from each row in cells:
J48, M48, O48, Q48, S48
These cells are part of a template and will trigger formulas in other cells.

I need a macro that will print the 200 different numbers one at a time.
Every thing is in sheet1.

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

venkat1926

Well-known Member
try this macro . remove msgbox line after checking.

Sub test()
Dim rng As Range, c As Range
Dim j As Integer
Dim i As Integer, k As Integer
j = 48
Set rng = Range(Range("AA1"), Range("AA1").End(xlDown))
For Each c In rng
c.Copy Cells(j, "J")
c.Offset(0, 1).Copy Cells(j, "M")
c.Offset(0, 2).Copy Cells(j, "O")
c.Offset(0, 3).Copy Cells(j, "Q")
c.Offset(0, 4).Copy Cells(j, "S")
j = j + 1

Next c

End Sub

newshound12

Active Member
Thanks venkat1926 for your effort. It is steering me in the right direction.

However , what I need is for range AA1:AE1 to be copied on line 48, then print; then for range AA2:AE2 to copied on line 48, then print, etc.

venkat1926

Well-known Member
can not this macro be modified

try this

remove the lline
j=j+1

then put a printing code before "next"
see whether it helps. I do not have a printer and so I cannot test.

newshound12

Active Member
Thanks for your help. I haven't been using excel for a couple of years and I'm relearning the stuff I forgot.

This is the final code that works:
Code:
``````    Dim rng As Range, c As Range
Dim j As Integer
Dim i As Integer, k As Integer
j = 48
Set rng = Range(Range("AA1"), Range("AA1").End(xlDown))
For Each c In rng
c.Copy Cells(j, "J")
c.Offset(0, 1).Copy Cells(j, "M")
c.Offset(0, 2).Copy Cells(j, "O")
c.Offset(0, 3).Copy Cells(j, "Q")
c.Offset(0, 4).Copy Cells(j, "S")
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Next c``````

venkat1926

Well-known Member
good that it works

Replies
2
Views
1K
Replies
4
Views
700
Replies
4
Views
651
Replies
1
Views
1K
Replies
0
Views
765

1,191,231
Messages
5,985,418
Members
439,963
Latest member
Triarch

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.

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

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