Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
where can I see my question and answer? Yesterday I ask a question | Excel Discussion (Misc queries) | |||
Newbie Question - Subtraction Formula Question | Excel Discussion (Misc queries) | |||
If, then, else question. | Excel Worksheet Functions | |||
The question is an excel question that I need to figure out howto do in excel. | Excel Worksheet Functions | |||
Another question for Jon | Charts and Charting in Excel |