View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Cush Cush is offline
external usenet poster
 
Posts: 126
Default Return results based on multiple criteria

Try this:

Select a cell in your database.
Turn on the Macro Recorder.
Click on DataFilterAutoFilter
Go to the Top of Col G.
Click on the arrow and select "Baby Boy"

Copy the rows and paste into your sheet("Children")
Turn off the recorder and study it.

See if you can get the code to include "Teenager" (AND)

Activate Sheet "Children"
Turn on you recorder and sort the new records.
Study the code.

"Bryce" wrote:

I really realy (1) need some VBA code for these steps:

selecting range A2:G8500within existing worksheet named "Master File"

then, looking at data in row G and if meets one of the two or three diff.
text inputs (i.e. "Baby Boy" or "Teenager") then it returns only that related
data row in cells A through G and places them in an existing worksheet named
"Children". I want this filtered data to start in cell A7 and the data to be
sorted in ascending order to data stored in Column D from the original
selected range.