View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Autofilter criteria based on cell value

You should be able to adapt the code on Ron de Bruin's site to do this

http://www.rondebruin.nl/copy5.htm

--
Regards,
Tom Ogilvy


"Craig" wrote in message
...
I have summary data of sales in the following format:


Salesperson Amount
John 5000
Jill 9000

etc.


I have a separate spreadsheet which gives me the detail for the above
information.

Salesperson Client Month
Discount Amount
John C1 May
20% 1000
Jill C2 June
15% 2000
Peter C3 June
10% 5000
Jill C4 June
5% 4000
John C1 June
10% 3000
Jill C2 July
5% 2000
etc



Is it possible to use VBA to autofilter the detailed data by Salesperson,
using the names in the summary detail, print off the filtered detail, and
then for it to loop to the next Salesperson in the summary data?

I know there are other ways of getting the info into the right format (pivot
tables etc, but I am particularly interested in a macro which could do this
as there are various other uses I could have for this sort of macro)

Thanks in advance.

Craig