Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help in printing a sorted list of customers purchases
I'm keeping track of an auction. I have a worksheet with 4 columns,
Item Number, Item description, Buyer and Amount = Columns A thru D. What I want to do is sort the list by buyer and then copy just the items from each buyer and paste that buyers items (and related data) to a place in the spreadsheet (the printable receipt area), lets call that starting at cell L6. Then I can print his receipt and then repeat the task for each subsequent buyer. I have it working manually, (I can copy the buyers data to the receipt area and then print the receipt) but it would be nice to automate the process. Any help would be greatly appreciated. Jonco |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help in printing a sorted list of customers purchases
use autofilter.
if using excel 2003, enter a formula in the last row of column D =subtotal(109,D2:d100) (or whatever your last row is) select a1:d1 then data/filter/autofilter select the buyer name from the dropdown in column C you should see the transactions for the buyer with the total -- Gary "Jonco" wrote in message ... I'm keeping track of an auction. I have a worksheet with 4 columns, Item Number, Item description, Buyer and Amount = Columns A thru D. What I want to do is sort the list by buyer and then copy just the items from each buyer and paste that buyers items (and related data) to a place in the spreadsheet (the printable receipt area), lets call that starting at cell L6. Then I can print his receipt and then repeat the task for each subsequent buyer. I have it working manually, (I can copy the buyers data to the receipt area and then print the receipt) but it would be nice to automate the process. Any help would be greatly appreciated. Jonco |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help in printing a sorted list of customers purchases
here's some code to automate it, change the sheet name if yours is different:
Sub summarize() Dim ws As Worksheet Dim lastrow As Long Set ws = Worksheets("Sheet1") lastrow = ws.Cells(Rows.Count, "A").End(xlUp).Row ws.Range("D" & lastrow).Offset(1).Formula = _ "=subtotal(109,D2:D" & lastrow & ")" With ws.Range("A1:D1") .AutoFilter End With End Sub -- Gary "Jonco" wrote in message ... I'm keeping track of an auction. I have a worksheet with 4 columns, Item Number, Item description, Buyer and Amount = Columns A thru D. What I want to do is sort the list by buyer and then copy just the items from each buyer and paste that buyers items (and related data) to a place in the spreadsheet (the printable receipt area), lets call that starting at cell L6. Then I can print his receipt and then repeat the task for each subsequent buyer. I have it working manually, (I can copy the buyers data to the receipt area and then print the receipt) but it would be nice to automate the process. Any help would be greatly appreciated. Jonco |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help in printing a sorted list of customers purchases
Thanks Gary, I'll give that a try.
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
using macros to categorise a list of customers | Excel Programming | |||
Using VLOOKUP without a sorted list | Excel Programming | |||
Sorted list | Excel Discussion (Misc queries) | |||
how do i set up a list of customers in excell for mail merge | Excel Discussion (Misc queries) | |||
How many different customers in a list? | Excel Worksheet Functions |