Autosize Rows in Named range

Chewyhairball

Active Member
Joined
Nov 30, 2017
Messages
312
Office Version
  1. 365
Platform
  1. Windows
Hi

I have a named range called "Summary Table" that I would like to Autofit the row height to the data that is typed in.
Sometimes its just a few words and other times might be a few sentences.

any ides?

thanks

Rory
 
You are welcome.
Glad that worked for you.
Found a bit of a problem. I can highlight say cells A20:A23 and centre across selection but when I do it on the next 3 cells A24:A26 then it centres it across A20:A26!?
 
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Found a bit of a problem. I can highlight say cells A20:A23 and centre across selection but when I do it on the next 3 cells A24:A26 then it centres it across A20:A26!?
It works OK if you have text in all of the cells but if you have a blank cell it seems to centre the data to the left accross all of the cells.
 
Upvote 0
Found a bit of a problem. I can highlight say cells A20:A23 and centre across selection but when I do it on the next 3 cells A24:A26 then it centres it across A20:A26!?
That is only centering across a single column, not multiple columns.
Center across selection works for centering across multiple columns within a single row.
 
Upvote 0
That is only centering across a single column, not multiple columns.
Center across selection works for centering across multiple columns within a single row.
Hi

I thought this might be useful to someone else. I inadvertantly discovered that if i use

VBA Code:
 If Not Intersect(Target, Range("Summarytable")) Is Nothing Then
   ActiveSheet.Unprotect
    Range("SummaryTable").Rows.AutoFit

instead of

VBA Code:
Range("SummaryTable").Rows.AutoFit

it works even accross merged cells.
 
Upvote 0

Forum statistics

Threads
1,215,566
Messages
6,125,596
Members
449,238
Latest member
wcbyers

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