Macro to print each row on list

newshound12

Active Member
Joined
Feb 19, 2003
Messages
339
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

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
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))
MsgBox rng.Address
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
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,213,530
Messages
6,114,162
Members
448,554
Latest member
Gleisner2

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