PRINTING HELP

  • Thread starter Thread starter Dave
  • Start date Start date
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
 
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
 
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
 
use data/subtotals there is a checkbox option to put a page break between
groups, very easy
 
Back
Top