Macro to make text wrap around

pincivma

Board Regular
Joined
Dec 12, 2004
Messages
206
Hi there

I'm not sure how to do this with a macro or if it is even possible. I have a spreadsheet that I have done a wrap text and merge cells in columns C to E from rows 22 to 382. Now every time that the text goes over the allotted length of columns C to E I have to manually make the row bigger so that I could see the wrapped text. Is there a macro than can make the row a perfect fit every time the text goes passed the allotted width of the merged columns C,D and E? I tried the Excel's Autofit Row Height but that does not work.

Thank you.
 
If you are asking if the cells formatted as numbers will merge, the answer is NO. As far as I know, you cannot merge cells that have numbers even if the numbers are formatted as text
Hi

I was asking more like : if there is text and number formats on the same row will the macro change the height of the row if the changes to the text on that row requires a wider or a narrower row.

Allister
 
Upvote 0

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hi

I was asking more like : if there is text and number formats on the same row will the macro change the height of the row if the changes to the text on that row requires a wider or a narrower row.

Allister
Hi Allister
When you press ENTER to run the macro, the row height will adjust initially to fit the text but the row width will remain the same. If you increase the text in the same cell, the row height will increase to fit the text but the cell width will remain the same. Now if you widen the cell by using the mouse, the cell width will increase but the row height will not decrease.
 
Upvote 0
Hi Allister
When you press ENTER to run the macro, the row height will adjust initially to fit the text but the row width will remain the same. If you increase the text in the same cell, the row height will increase to fit the text but the cell width will remain the same. Now if you widen the cell by using the mouse, the cell width will increase but the row height will not decrease.
Thanks for your email.
In my post 11 i shoul have said
I was asking more like : if there is text and number formats on the same row will the macro change the height of the row if the changes to the text on that row requires a higher or a narrower row.

Thank you

Allister
 
Upvote 0
Thanks for your email.
In my post 11 i shoul have said
I was asking more like : if there is text and number formats on the same row will the macro change the height of the row if the changes to the text on that row requires a higher or a narrower row.

Thank you

Allister
The answer is NO. The macro only works on individual cells that you run the macro on and not on the entire row.
 
Upvote 0

Forum statistics

Threads
1,223,099
Messages
6,170,107
Members
452,302
Latest member
TaMere

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