Autosize Row Height VBA Macro

lawi227

Board Regular
Joined
Mar 17, 2016
Messages
123
I have a worksheet called "Selected LP List" and on that worksheet, there are index(match()) functions in columns A:F that returns text linked to another worksheet. The problem I am having is that the rows do not automatically adjust the height so any wrapped text is cut off. Typically, column F will have the most text. In columns G:N, I manually enter notes and comments into those columns. There may be times when column G has the most text.

I need the macro to by dynamic because 1) the column with the most text is not always the same, and 2) the number of rows that returns text changes based on my selection. Note: the index match formula runs from row 4:740.

Thanks in advance!
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Bump. Any help on this?

I have found similar posts but none of the codes have worked.

Range("A" & row & ":F" & row).EntireRow.AutoFit
Range("F4:C" & lngLastRow + 10).Rows.AutoFit
I have a worksheet called "Selected LP List" and on that worksheet, there are index(match()) functions in columns A:F that returns text linked to another worksheet. The problem I am having is that the rows do not automatically adjust the height so any wrapped text is cut off. Typically, column F will have the most text. In columns G:N, I manually enter notes and comments into those columns. There may be times when column G has the most text.

I need the macro to by dynamic because 1) the column with the most text is not always the same, and 2) the number of rows that returns text changes based on my selection. Note: the index match formula runs from row 4:740.

Thanks in advance!
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,885
Members
452,364
Latest member
springate

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