View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default macro to copy/paste range for printing

Since this is set up like a database table, it might be easier to select the
data and do Date=filter=Autofilter in the menus. This will place
dropdowns in the top cell of the selection in each column. You can select
the dropdown for the date column and select custom. then specify the range
of dates. Then print the sheet.

To remove the filter dropdowns to Data=Filter=Autofilter again. (or to
leave the dropdowns and show all the data do Data=Filter=Show All

If you actually want to copy the data, you can look at
Data=Filter=Advanced Filter and select the copy to option. You would need
to set up a criteria range where the users put the criteria.

--
Regards,
Tom Ogilvy


"Mike Wasilewski" wrote:

I have a spreadsheet with weekly sales in which the first column has the
list of categories such as 'Residential', 'Commercial', Reconstruction',
etc.

column B and the columns beyond have a date for the heading such as
'1/06/06', '1/13/06', ... corresponding to each Friday for the year.

I am looking for a way to allow the user to easily print this for any
particular month without having to manually select the columns for that
month and pasting them into an area with a heading or onto another
worksheet.

I would like to create a macro that would take input as either the month to
print or 'From Col' and 'To Col' that would copy and paste the data where it
is needed so the user can print the report.

I am not familiar with VB and do not use Excel very often, but I am familiar
with other programming languages. Any help from the Excel/VB gurus would be
greatly appreciated.

Mike