how do I sort and filter by different criteria

H

hebgengirl

I have input all my recipes into excel and I want to be able to sort them by
category, ie. according to type of food, rating, ease of preparation, etc.
The whenI tried to sort by clicking on the category title, only that column
sorted and it messed up the data because the rows didn't match up. I'd like
to be able to click on a column heading, rating for example, and have all my
favorite recipes appear according to the rating. I am using Microsoft Excel
2003.
 
G

Gord Dibben

Have you saved the workbook with the messed up rows?

If not, Undo should reverse the action of your sort.

Just make sure when sorting to pre-select all data columns before the sort.

Don't let Excel guess.

As far as filtering...........with no idea of your data layout it is hard to
visualize your needs.


Gord Dibben MS Excel MVP
 
D

Don Guillett

Right click sheet tab>view code>insert this>define a name for your sort
range
=OFFSET(yourshtname!$A$7,0,0,COUNT(yourshtname!$A:$A),10)
you may prefer countA

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range, Cancel
As Boolean)
[sortrange].Sort Key1:= _
Cells(1, ActiveCell.Column), Order1:=xlAscending, Orientation:=xlTopToBottom
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top