Auto-adjust row height? (1 Viewer)

fat controller

Slightly round the bend..
Local time
Today, 03:55
Joined
Apr 14, 2011
Messages
758
I have inherited a spreadsheet that needs some modifications, and am wondering if I can make it a little more user-friendly. My initial thoughts were to start again from scratch, but I am under instructions that this is not an option and I need to make the modifications to the existing layout.

So, each sheet (there are 28 near identical sheets), has a number of rows (60 to 70) that contain some merged cells (merged columns only, not rows) that are purely text. The sheet is to be protected to stop tampering, but the rows concerned are not locked.

What I would like to do is have the row height automatically adjust if someone types in text into one of the cells that is larger than the current row height - is this possible?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 03:55
Joined
Feb 19, 2013
Messages
16,612
not tried it, but if you follow the steps in this link to record a macro
https://support.microsoft.com/en-us/kb/149663
then copy to worksheet selectionchange event (?perhaps a different one, you'll need to experiment) and modify to work off the target.row - you can also modify it to only run if the target row is one of those you want to adjust. - either by hardcoding the row numbers or by having a hidden column to act as a flag.

You can probably put into the thisworkbook module, but would need to find the right event to call the code.
 

fat controller

Slightly round the bend..
Local time
Today, 03:55
Joined
Apr 14, 2011
Messages
758
Thanks - I have just given it a shot, and even with text in there it assumes that it is height of a single row of text. I think I might be best to make the rows of a fixed height and let that dictate what is written in them. Come back Access, all is forgiven!
 

CJ_London

Super Moderator
Staff member
Local time
Today, 03:55
Joined
Feb 19, 2013
Messages
16,612
it works for me - cells in the row need to be wrapped - at least those that you want to potentially increase the row height.
 

fat controller

Slightly round the bend..
Local time
Today, 03:55
Joined
Apr 14, 2011
Messages
758
This spreadsheet is a bit of a mess truth be told - 5mb file size was a dead giveaway for a starter.

The more I am plodding through it, the more I am stripping out whilst keeping the costmetics of it the same -- as long as it looks the same to the directors, they won't have a clue what has actually changed. :D
 

Users who are viewing this thread

Top Bottom