Copying a range based on criteria

  • Thread starter Thread starter AmyTaylor
  • Start date Start date
A

AmyTaylor

Hi everyone, hope someone can help:

I have a worksheet called "data" which contains a range of values, ro
A contains the header values and the data within the sheet has th
defined name "database".

I have another sheet called "Report", which contains in cell B1 a dro
down list of all the known dates in the "data". cell B2 contains a dro
down list of all the known "Names" in the "data" worksheet.

What I would like to do on the sheet called "report" is bring acros
all the data which matches the values selected in cell B1 and B2.

Let me know if that isnt explained well.
Thanks for your time
Love Amy x
 
Start on sheet Data
Turn on the macro recorder and then step through the Data=>Filter=>Advanced
Filter. Select the database, select copy to another location. Select the
revised criteria range (as shown below). Select the new location on Report.
Execute the query. Turn off the macro recorder and look at the recorded
code.

You will need to change your layout on sheet2 like

B1: Date (change to the header name of the date column)
C1: Name (change to the header name of the name column)
B2: Dropdown with Dates
C2: Dropdown with Names

Make your criteria range Report!B1:C2
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top