#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Macro Query

Hi there

I'm hoping someone can help me with this... I'm wanting to run a report from
a worksheet that has around 15000 lines of data, based on two criteria. I
have tried using Autofilter, but my computer keeps crashing.

The report I'd like to run is based on a particular month. So say in the
reporting worksheet (called Report) if I type in the month I'm interested in,
in say cell A1, and have a button to press with the macro behind it, then the
Macro would look at the data worksheet (called Data) and find all the records
relevant to that particular month. (The month data in the data worksheet is
in column K.) Also at the same time I would like the macro to look at Column
E and find all the lines that say "TEST".

At the same time, if there is previous data on the €śReport€ť worksheet, can
this be deleted before the new information is added.

So the report on the "reporting" worksheet would copy all the lines from the
"Data" worksheet that are from the month in cell A1, and have "TEST" in
column E. The data on the data worksheet ranges from A to N.

I hope this makes sense! And any help would be greatly appreciated.

--
rmsmith
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default Macro Query

On the REPORT sheet put Month in Cell A1 & A10 . In Cell B1 & B10 put the
heading name for Column E.

Assign the following macro to the embedded ActiveX macro button on the
REPORT sheet.
Sheets("Data").Range("A1:B97").AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Sheets("Report").Range("A1:B2"),
CopyToRange:=Sheets_("Report").Range("A10:B10"), Unique:= _
False
good luck

"rmsmith" wrote:

Hi there

I'm hoping someone can help me with this... I'm wanting to run a report from
a worksheet that has around 15000 lines of data, based on two criteria. I
have tried using Autofilter, but my computer keeps crashing.

The report I'd like to run is based on a particular month. So say in the
reporting worksheet (called Report) if I type in the month I'm interested in,
in say cell A1, and have a button to press with the macro behind it, then the
Macro would look at the data worksheet (called Data) and find all the records
relevant to that particular month. (The month data in the data worksheet is
in column K.) Also at the same time I would like the macro to look at Column
E and find all the lines that say "TEST".

At the same time, if there is previous data on the €śReport€ť worksheet, can
this be deleted before the new information is added.

So the report on the "reporting" worksheet would copy all the lines from the
"Data" worksheet that are from the month in cell A1, and have "TEST" in
column E. The data on the data worksheet ranges from A to N.

I hope this makes sense! And any help would be greatly appreciated.

--
rmsmith

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
Macro Query rmsmith Excel Discussion (Misc queries) 0 December 14th 09 05:27 AM
Macro Query carla 7 Excel Discussion (Misc queries) 5 July 31st 08 04:07 PM
Macro Query shakey1181 Excel Discussion (Misc queries) 3 July 24th 07 07:55 PM
another macro query - deleting a worksheet within a query DavidHawes Excel Discussion (Misc queries) 2 February 26th 07 10:05 AM
NEW WEB QUERY MACRO A.J Setting up and Configuration of Excel 0 July 24th 05 04:31 AM


All times are GMT +1. The time now is 08:03 AM.

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"