Thread: rows....
View Single Post
  #2   Report Post  
Paul B
 
Posts: n/a
Default

Ankur, you could use subtotals, Data, subtotals, and check insert page break
between groups, or a macro like this with vendors numbers in column A

Sub Insert_Page_Breaks()
'Will insert a page break at change of data in column A
Set rng = Range(Cells(2, 1), _
Cells(Rows.Count, 1).End(xlUp))
For Each cell In rng
If Trim(cell.Value) < _
Trim(cell.Offset(-1, 0).Value) Then
ActiveSheet.HPageBreaks.Add cell
End If
Next
End Sub


And to clear all the page breaks

Sub Remove_All_Page_Breaks()
ActiveSheet.ResetAllPageBreaks
End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Ankur" wrote in message
...
i have a worksheet of vendor account details. in one column there are

vendor
numbers & some vendors have 5 line items some have10,15,50,etc i.e. line
items are different. Now the problem is every month i have to prepare

vendors
template and i have to insert 5 rows after every change in vendor number

in
vendor column.

right now i am going manually at each vendor change and inserting rows as
detail above, there are about 700 vendors. this is not only time consuming
but frustating job.

so there any way to develop macro for this or any other way so that by
giving one command the above problem can be sorted out

thanks a lot in advnace.....