Use the following steps to create a Gmail filter;
1. Click the downward facing arrow in the Search Web box in any open Gmail window.
2. Enter the search criteria you would like to use to create the filter. This can include include keywords, email addresses, and domains.
3. Run a Test Search to see which existing Gmail messages would match your chosen filter criteria. To see the result push the x on the screen. Your search will be saved when you push the arrow again. When you're satisfied with the results click Create filter with this search. (Note: You can skip this step, but creating a filter without testing it can lead to some very interesting, although no useful, results.)
4. Select one or more actions from the list provided. Actions should be selected in the order to be used. These actions will be applied to messages that match the filter criteria you have created. For example, Delete it is one of the actions available. When you select this action, all of the messages that meet your filtering criteria will be deleted.
5. If you want to apply the created filter to existing Gmail messages, click Also apply filter to x conversations. If you don't use this step, existing conversations will have to be manually tagged.
6. When you're done making your selections, click the Create Filter link to finalize and begin using the filter.