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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel row height problem using sort.

Status
Not open for further replies.

gargoyle47

Technical User
Mar 7, 2005
78
Excel row height problem using sort.
I have a Excel work sheet the rows are of various size.
Most are 20 high, some are 30 high.
Now if I do a sort the size of the cell is not kept with the cell so I have to manual go through the sheet and change them to the correct size.

Is there a way to keep the alter size with the correct cell.

Using WinXP SP2 with Excel 97 SR-1

Never Say Never (Romeio Void)

Homebuilt MSI MD5000MD-5000 M-ATX, 2.4Gig, 393mb, WinXp Pro
Homebuilt Iwill KK266R-Plus, 768mb, WinXp Pro
 
Have you tried turning on "Wrap" under the format properties for either the whole sheet or the particular column that needs that size of cells? That should format each row to fit the needs of the particular cell (thus the formatting would move with the cell, I would think).

Just make sure that you at least set a whole colum to that.

To change that setting:

1. Select either one or more columns or the whole worksheet.
2. Right-click on the selection
3. Choose "Format Cells"
4. Go to the "Alignment" tab
5. Under the section, "Text control", check the box next to "Wrap text". If it is a solid square (not empty), then you may have to check it more than once, b/c some are set to that, and some are not. If all the cells have that formatting, it will be a checkmark instead of an empty or solid square/checkbox.
 
Thank kjv1611,

However I checked the setting for the columns in question and the Warp text is already checked off.

It seems like this formatting is not being carried with the cell.

However upon looking closer at Format, I did find the Autofit under Rows and columns and this seem to do the trick.

Thanks for you reply.

Never Say Never (Romeio Void)

Homebuilt MSI MD5000MD-5000 M-ATX, 2.4Gig, 393mb, WinXp Pro
Homebuilt Iwill KK266R-Plus, 768mb, WinXp Pro
 
I am a little curious. Do all cells in a column have wrap text turned on? Or only those that have more text than what can fit?



Me transmitte sursum, Caledoni!
 
row sizing is nothing to do with formatting - that is why it does not move with the data

To resize quickly (but still manually), select all rows and double click on the border of any of them - this will autofit the rows to the contents of the cells

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
A quick question: If what Geoff suggests does not fix the problem, are there specific heights you wish to acheive depending on the data? If there is a logical/didactic explanation as to the *why* of the row height, please share it with us.

-----------
Regards,
Zack Barresse
 
You want to turn Wrap ON for the entire column. As xlbo say, wrap is a cell attribute and does not move with the data. Wrap is a property that is on or off for a cell regardless of how much text is in the cell.

If you have Wrap on, the cells will autofit based on the data in the cell after the sort.

Dino
 
As I state I used Auto fit to fix the problem.
Auto fix is global action meaning it will effect the whole worksheet not just a single column.
However the problem with Auto fit , is it uses the default cell height 15. I would have like to have change the default height to 20 to give a little more white space around the cell data.

This way it would have easier to read.

To xlbo (MIS):
You said:
To resize quickly (but still manually), select all rows and double click on the border of any of them - this will autofit the rows to the contents of the cells

I tried what you describe but it does not seem to do anything. Is this action version dependent meaning I am using version Word97 in WinXp?

To Dinobrago (TechnicalUser)
You said:
If you have Wrap on, the cells will autofit based on the data in the cell after the sort.

The problem arises in that if data in one (primary ) column is a single line entry but data in another column ( with Warp ON) is more the one line, it force the row to conform to the data which has more then one line.
To get around this problem, you undo Warp on the non-primary column this will allow the primary column to be fit.

Question can you change the default cell height? Default is 15, I would like Auto fit to change height to 20.

Never Say Never (Romeio Void)

Homebuilt MSI MD5000MD-5000 M-ATX, 2.4Gig, 393mb, WinXp Pro
Homebuilt Iwill KK266R-Plus, 768mb, WinXp Pro
 
I am using version Word97
I thought we were talking about excel ??

The method will work if ALL cells are set to wrap

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Sorry yes it Excel, I was just doing searches on Word97 and I guess it just stuck in my head when I wrote out the post.

Getting back to your suggestion. I do not want to start nagging on you or start a flame war but
To resize quickly (but still manually), select all rows and double click on the border of any of them - this will autofit the rows to the contents of the cells
.
Then you said
The method will work if ALL cells are set to wrap
If the cells are set the warp, I have found they automatically expand in height to accommodate what ever is in the cell. So the first post did not have this listed.
But what was that part about double click on the border about? I do not understand why I would need to do it.

Am I missing something here or not understanding what you are saying?

Never Say Never (Romeio Void)

Homebuilt MSI MD5000MD-5000 M-ATX, 2.4Gig, 393mb, WinXp Pro
Homebuilt Iwill KK266R-Plus, 768mb, WinXp Pro
 
double clicking on the row border should autofit the height just like doiuble clicking on the column border autofits a column

This was a suggestion if your WRAP settings weren't working properly or were set to off (as per your second post)



Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Autofit will autofit whether Wrap is turned on or not. Wrap Cells will only dictate to which size to fit the row/column. Sometimes Wrap Cells does not work as intended, you may have to lengthen the column slightly and then autofit the rows followed by the columns. Play with it.

HTH

-----------
Regards,
Zack Barresse

Simplicity is the ultimate sophistication.
- Leonardo da Vinci
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top