I did a search on this here, and from a thread dated 2004 I ended up with something like this:
=IF(AND(NOT(ISERROR(SEARCH($A$1,DATA!$A2,1))),DATA!B2<>""),DATA!B2,"").
Copied both across and down in a new worksheet, this will successfully populate said new worksheet with any rows of data in which the contents of cell A1 in DATA! exist in col. A, otherwise the row remains blank. The problem with that is ending up with hundreds of blank rows and needing to sort, delete, etc., rows. Much better would be some code to do the conditional filtering on the way in. Is that possible? (N.B. I have B2 here because my DATA worksheet contains a calculation column A whose contents are not to be populated, only used for the conditional.)
=IF(AND(NOT(ISERROR(SEARCH($A$1,DATA!$A2,1))),DATA!B2<>""),DATA!B2,"").
Copied both across and down in a new worksheet, this will successfully populate said new worksheet with any rows of data in which the contents of cell A1 in DATA! exist in col. A, otherwise the row remains blank. The problem with that is ending up with hundreds of blank rows and needing to sort, delete, etc., rows. Much better would be some code to do the conditional filtering on the way in. Is that possible? (N.B. I have B2 here because my DATA worksheet contains a calculation column A whose contents are not to be populated, only used for the conditional.)