PRINTING HELP

D

Dave

Hi, I have a huge excel file that lists transactions by peoples names. How
can I easily print each individual on seperate sheets so that non of the
individuals overlap onto others sheets?

Thanks
 
J

Jacob Skaria

You can use the below macro. which will put page breaks after each name...I
tried this with the names below in Col A.

Sub InsertPageBreak()
Dim lngRow As Long
For lngRow = 3 To Cells(Rows.Count, "A").End(xlUp).Row
If Range("A" & lngRow) <> Range("A" & lngRow - 1) Then
ActiveWindow.ActiveSheet.HPageBreaks.Add Before:=Range("A" & lngRow)
End If
Next
End Sub

ColA
Name1
Name1
Name1
Name1
Name1
Name2
Name2
Name2
Name2
Name3
Name3
Name3
Name3
Name3
Name3
Name4
Name4
Name4
Name4

If you are new to macros; set the Security level to low/medium in
(Tools|Macro|Security). From workbook launch VBE using short-key Alt+F11.
From menu 'Insert' a module and paste the below code. Save. Get back to
Workbook. Run macro from Tools|Macro|Run <selected macro()>

If this post helps click Yes
 
D

Dave

Yes, They appear on there own row. Collectively they take up about 6000 rows.

Thanks
 
Y

YESHWANT JOSHI

hi dave,

kindly look possibility of using filters to the file. i strongly feel that
using filter can solve your problem.

select all the data u r having - click on data - filter - autofilter

click on the small downward arrow appearing on the top row and select the
name of the individual u want to take print, and try to take the print.

if it helps, kindly click on yes below
 
D

dlw

use data/subtotals there is a checkbox option to put a page break between
groups, very easy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top