Excel 2007 AutoFit Row Height not working


K

KristinQ

I have several cells that are aligned "Top" with wrap text turned on that run
past the border of the cell. The Format/AutoFit Row Height command does not
fix the issue, nor does selecting all and clicking on the bottom row border.
I'm having to fix them all by hand. What am I doing wrong? They are only
one or two sentences long, so shouldn't be too much data. Thanks!
 
Ad

Advertisements

K

KristinQ

Thanks for the response, Gord. My cells weren't merged, but the header cells
over them in Row 1 were. I deleted the merged cells, saved all as a new
document and tried again. Still didn't work.

I then selected all and unchecked the "Wrap Text" box so it's back on the
normal wrap setting. That put all the rows at one-line height. I then
selected all and did Format/AutoFit Row Height. Still not working.

I'm not a developer, but tried that link you sent. I tried the code from
both MarkN and Greg Wilson using the VB window for each sheet. Nothing
happened, so I tried the Format/AutoFit Row Height command again after
pasting the VB code, but nothing seemed different. I don't really know how
to use VB though, so I'm sure it's user error.

It doesn't seem to make sense that as a layman I would need to know how to
use VB code just to make the rows AutoFit....I think I'm missing something.

Thanks for trying to help.
 
G

Gord Dibben

With Target
If .MergeCells And .WrapText Then

If you have no merged cells, the code will do nothing so might as well
delete the code from your sheet.

In order for Autofit to work properly, the cells must be set to Wrap Text.

Select all and set to Wrap Text.

Select all rows and set to Autofit.


Gord
 
K

KristinQ

Still doesn't work. I think my workbook is broken. I'll probably be bettter
off starting from scratch with a new one. Those features all work properly
when I open a new workbook and play with the cells, so there must be
something wrong with my data. Ugh.

Thanks again.
 
G

Gord Dibben

Good luck.


Gord

Still doesn't work. I think my workbook is broken. I'll probably be bettter
off starting from scratch with a new one. Those features all work properly
when I open a new workbook and play with the cells, so there must be
something wrong with my data. Ugh.

Thanks again.
 
Ad

Advertisements

H

howard faye

Kristin - I have the same problem with auto-fit not working. Sometimes it works but mostly it does not work. I think it is because Excel is junk and Microsoft does not care. Excel has a lot of other problems (clipboard issues, scrolling issues etc.). It seems that there is a million blogs about the auto-fit bug yet Microsoft just does not fix it. I wish I could help but I am also searching for a solution.
 
Ad

Advertisements

Joined
Jan 2, 2013
Messages
1
Reaction score
0
I've just noticed something after having the same problem, I apologise for necromancing an old thread but if you have your excel sheet zoomed in it will look like the autofit isn't working when it actually is, seems to be a problem with rendering text when zooming in or out.
 

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