AutoFit Row Height not working

srdavisgb

Board Regular
Joined
Nov 5, 2011
Messages
51
Thanks in advance for your assistance...

My goal is to autofit row height to fit text when it wraps within a cell. And, when the text is removed (or revised to fit one row), the row height adjusts to a single row height (e.g., 15.00).

I have created a 2013 workbook with rows where the row height may have been manually set. I just don't recall. I've read that may be an issue and have tried to reset the row height with Autofit Row Height.

I have formatted a column to populate data via a vlookup formula in the cells. Some of the data in the vlookup results in text that will wrap. There are no merged cells in any of the rows. I highlighted all rows in the worksheet and selected Format, AutoFit Row Height. The rows will not autofit.

Any suggestions?

Thanks
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
It may be bulky, but it gets the job done for me:


With ws.Range("b" & 13, "b" & 17)
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlCenter
.WrapText = True
End With

ws.Range("b" & 13, "k" & 13).Merge
ws.Range("b" & 14, "k" & 14).Merge
ws.Range("b" & 15, "k" & 15).Merge
ws.Range("b" & 16, "k" & 16).Merge
ws.Range("b" & 17, "k" & 17).Merge

ws.Range("b" & 13, "k" & 13).EntireRow.AutoFit
ws.Range("b" & 14, "k" & 14).EntireRow.AutoFit
ws.Range("b" & 15, "k" & 15).EntireRow.AutoFit
ws.Range("b" & 16, "k" & 16).EntireRow.AutoFit
ws.Range("b" & 17, "k" & 17).EntireRow.AutoFit
 
Upvote 0

Forum statistics

Threads
1,215,767
Messages
6,126,778
Members
449,336
Latest member
p17tootie

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top