To set up a new filter, click Options in the upper-right corner of your Yahoo! Mail page, then click on More Options.
From the list on the left side of the page, click Filters, then in the center of the page, click Create or edit filters.
On the “Filters” page that opens, click "Add", give the filter a name, and choose from a variety of options to automatically direct certain emails into a specific folder. For example, set up a filter so that any emails you get from your family go into a folder called "Family." When you're done, click "Add Filter."
If you create more than one filter, pay attention to the order Yahoo! Mail lists them. Emails are filtered first by the first filter. That might sound obvious, but this example shows how confusion can happen.
Let's say your sister has an email account with "NeatMail." If your first filter is an "@neatmail" filter (any address that contains "@neatmail"), and your second filter is a Family filter (any address that contains your last name), then the @neatmail filter will send her emails into the folder you specified for the @neatmail filter—instead of into the folder you specified for the Family filter, every time. This is because the @neatmail filter comes first.