Excel: exporting rows that meet criteria

Closed
c.s.davis Posts 1 Registration date Monday August 29, 2011 Status Member Last seen August 28, 2011 - Aug 28, 2011 at 11:14 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Sep 1, 2011 at 06:30 AM
Hello,

I'm new to this forum and also to macros so please excuse any technical slip-ups. Thanks in advance for help! I currently have two Excel workbooks, Child Data and Woman Data. I need to merge these two into one workbook, but with the caveat that not every woman in Woman Data is a mother of a child in Child Data. There is a column in each workbook for Woman(Mother)ID, and what I would like to do is create a filter such that I can export rows in Woman Data where the entry for Woman(Mother)ID matches an entry for Woman(Mother)ID in Child Data. Some women have more than one child, and so this also would need to be able to export some rows multiple times. For example, Child Data looks like this:

Child ID Woman(Mother ID) Child Var1 Child Var2 Etc
10 1000 0 1
11 1000 0 0
20 2000 1 1

And Mother Data looks like this:

Woman(Mother ID) Woman(Mother)Var1 Woman(Mother)Var2 Etc
500 0 0
1000 1 0
1200 0 0
2000 1 1

Thanks for any advice!

Related:

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Sep 1, 2011 at 06:30 AM
It is hard to see the data here. Could you post on some file sharing website a sample workbook and post back the link to the file here. The book should have some sample data that would be a good representative of your data. based on that book, could you also please re-explain the issue.
0