Macro to adjust cell heights with wrapped text

Jest

New Member
Joined
May 9, 2024
Messages
2
Office Version
  1. Prefer Not To Say
Platform
  1. Windows
Hey Excel enthusiasts! I need some advice on creating a macro. I have an Excel sheet filled, and it's a bit messy with merged and centered cells. Some columns and rows are merged and centered, and I want to tidy it up by adjusting the cell heights to match the wrapped text.

I've scoured the internet for Visual Basic code that fits my needs, but none seem to do the trick. Does anyone have a suggestion or a working macro that could help me out? Your expertise would be greatly appreciated!

Thanks in advance for any assistance you can provide!
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Isn't that just a formatting control?

Tick Shrink to fit and maybe Wrap text.

If you don't want to use Wrap text, then alt-Enter will wrap the text where you want it while you are typing it in.


1715319322662.png
 
Upvote 0
Hi WhoCanDo

Thank you for looking into this. I was really hoping for a quick fix, but it seems like the task box is grayed out, preventing me from checking it. I've attached a screenshot and description of what the document looks like for your reference. If you have any further suggestions or if I'm missing something obvious, please let me know. Your advice is greatly appreciated.
 

Attachments

  • IMG_9093.png
    IMG_9093.png
    32.7 KB · Views: 17
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,226
Members
452,620
Latest member
dsubash

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