ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Return results based on multiple criteria (https://www.excelbanter.com/excel-programming/341395-return-results-based-multiple-criteria.html)

Bryce

Return results based on multiple criteria
 
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.

Cush

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.



All times are GMT +1. The time now is 08:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com