#1   Report Post  
Posted to microsoft.public.excel.misc
Wu Wu is offline
external usenet poster
 
Posts: 36
Default big question to me

Hello!

I have some product data include invoice no.,part no.,quantity

Shown as below:

Invoice no. | Part no. | Qty.
H0907-001 ERW123 20,000
H0907-001 EAW122 10,000
H0907-002 AWE112 50,000
H0907-003 BPR225 10,000
H0907-003 CRE123 5,000
:
:
:
H0907-XXX XXXXX XX,XXX


I would like to print out these data in seperate page depends on the invoice
no.

For example:

In page 1

H0907-001 ERW123 20,000
H0907-001 EAW122 10,000

In page 2

H0907-002 AWE112 50,000


In page 3

H0907-003 BPR225 10,000
H0907-003 CRE123 5,000


Have any simple methods? Can I just insert a symbol between these invoices?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default big question to me

You can try out the below macro. 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.
--Get back to Workbook.
--Run macro from Tools|Macro|Run <selected macro()
--Assume you have the Invoice numbers in ColA starting from row2. and Row1
with headers...The macro will insert pagebreaks after each group of invoice
number. Try print preview once you run the macro and feedback

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

If this post helps click Yes
---------------
Jacob Skaria


"Wu" wrote:

Hello!

I have some product data include invoice no.,part no.,quantity

Shown as below:

Invoice no. | Part no. | Qty.
H0907-001 ERW123 20,000
H0907-001 EAW122 10,000
H0907-002 AWE112 50,000
H0907-003 BPR225 10,000
H0907-003 CRE123 5,000
:
:
:
H0907-XXX XXXXX XX,XXX


I would like to print out these data in seperate page depends on the invoice
no.

For example:

In page 1

H0907-001 ERW123 20,000
H0907-001 EAW122 10,000

In page 2

H0907-002 AWE112 50,000


In page 3

H0907-003 BPR225 10,000
H0907-003 CRE123 5,000


Have any simple methods? Can I just insert a symbol between these invoices?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
where can I see my question and answer? Yesterday I ask a question IP Excel Discussion (Misc queries) 2 May 10th 08 04:08 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
If, then, else question. MAB Excel Worksheet Functions 5 March 7th 06 01:38 PM
The question is an excel question that I need to figure out howto do in excel. Terry Excel Worksheet Functions 3 January 23rd 06 06:22 PM
Another question for Jon Wazooli Charts and Charting in Excel 1 March 26th 05 06:57 AM


All times are GMT +1. The time now is 12:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"