Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lock Rows in Excel 2003 1

Status
Not open for further replies.

rarch1

Technical User
Mar 16, 2006
6
US
We have a simple spread sheet with three columns: Last Name, Job Title and Phone Number. Sometimes we need to sort by Name and sometimes we need to sort by Job Title. However, if we sort by a column, only one column will sort and the other two columns will stay in place.

Is there a way in excel to lock all the rows so that if you do a sort on one column, all the rows will stay together?

I have been searching the internet trying to find a way to lock rows together, however, everthing I researched relates to freezing one row. Im sure there is probably a simple solution and I am just using the wrong phrase to search for.

Thanks for the help
 
Hey, rarch1.

My first guess is that you have empty columns in your data set. For example:[tt]
ColA Last Name
ColB Left empty
ColC Job Title
ColD Left empty
ColE Phone Number[/tt]

If you simply click in Column A and sort, how is excel supposed to know that these non-contiguous columns contain related data?

So there are two ways to do what you want. I strongly recommend the first one.
[tab]1) Get rid of the empty columns! I'll bet they are only there for formatting purposes. That's fine for a report, but it is a terrible way to store/analyze your data. If all data is in contiguous columns, Excel will automatically assume that the columns contain related data and all rows (or records) will be sorted together.

[tab]2) Select all of the data you want to sort. Go to Data > Sort and walk through doing your sort. By selecting all of the columns, you have told Excel that they are related.

Again, I urge you to just get rid of those empty columns.

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
My first guess is that they are selecting a column and then sorting.

Select only one cell (a cell in the column you want to sort by) and then sort

Do not select multiple cells before clicking the sort button.

 
lilliabeth,

You were right on, I was selecting a column thinking that a sort would sort by that column. Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top