ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Linked cells and text wrap / autofit function (https://www.excelbanter.com/excel-worksheet-functions/144760-linked-cells-text-wrap-autofit-function.html)

Ken H

Linked cells and text wrap / autofit function
 
I am trying to link a cell to another cell that contains text only and have
the linked cell auto fit. I have wrap text and autofit enabled for the entire
sheet. Per previous discussions I don't have any merged cells anywhere in the
workbook. In fact these are the only two cells that currently contain any
data. My data entry cell autofits fine but the linked cell dosen't change
unless I perform an autofit command to it then it won't change until I do it
again.
Thanks for reading and any help you may have.

Dave Peterson

Linked cells and text wrap / autofit function
 
That's the way excel works.

You could have an event macro resize the rows/columns whenever the worksheet
recalculates. But be aware that these kinds of things will kill your edit|Undo
ability.

If you want to try, right click on the worksheet tab that should have this
behavior. Select view code and paste this into the code window:

Option Explicit
Private Sub Worksheet_Calculate()
Me.Rows.AutoFit
'or be specific
Me.Rows("1:33").AutoFit
End Sub



Ken H wrote:

I am trying to link a cell to another cell that contains text only and have
the linked cell auto fit. I have wrap text and autofit enabled for the entire
sheet. Per previous discussions I don't have any merged cells anywhere in the
workbook. In fact these are the only two cells that currently contain any
data. My data entry cell autofits fine but the linked cell dosen't change
unless I perform an autofit command to it then it won't change until I do it
again.
Thanks for reading and any help you may have.


--

Dave Peterson


All times are GMT +1. The time now is 05:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com