Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Help in printing a sorted list of customers purchases

Thanks Gary, I'll give that a try.

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
using macros to categorise a list of customers jamesea Excel Programming 1 March 19th 07 04:18 PM
Using VLOOKUP without a sorted list dzuy Excel Programming 2 July 25th 06 04:28 PM
Sorted list G Chartrand Excel Discussion (Misc queries) 2 April 28th 06 05:07 PM
how do i set up a list of customers in excell for mail merge Redford Excel Discussion (Misc queries) 3 August 26th 05 04:53 PM
How many different customers in a list? cathcarr1 Excel Worksheet Functions 4 July 14th 05 01:02 PM


All times are GMT +1. The time now is 06:15 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"