ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Linked Spreadsheet rows (https://www.excelbanter.com/excel-worksheet-functions/144421-linked-spreadsheet-rows.html)

lnorswo

Linked Spreadsheet rows
 
When linking spreadsheets together into a rollup spreadsheet I can not get
the rows to autofit? Can anyone help?
Thank you so much...:)

Gord Dibben

Linked Spreadsheet rows
 
Do you have wrap text enabled?

Have you any merged cells in the range? Merged cells won't autofit without VBA
code.


Gord Dibben MS Excel MVP

On Tue, 29 May 2007 06:17:01 -0700, lnorswo
wrote:

When linking spreadsheets together into a rollup spreadsheet I can not get
the rows to autofit? Can anyone help?
Thank you so much...:)



lnorswo

Linked Spreadsheet rows
 
Wrap Text is enabled in all the sheets and although I do not have a merged
cell in the row.... I do have one in that particular column. Can you
advise? I am no good with VBA code...

"Gord Dibben" wrote:

Do you have wrap text enabled?

Have you any merged cells in the range? Merged cells won't autofit without VBA
code.


Gord Dibben MS Excel MVP

On Tue, 29 May 2007 06:17:01 -0700, lnorswo
wrote:

When linking spreadsheets together into a rollup spreadsheet I can not get
the rows to autofit? Can anyone help?
Thank you so much...:)




Gord Dibben

Linked Spreadsheet rows
 
I would get rid of the merged cells.........nothing but problems.

But for event code you can check this out.

Here is event code from Greg Wilson that runs when you ENTER out of a merged
cell.

Note: wrap text format must be preset on the merged cells.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim NewRwHt As Single
Dim cWdth As Single, MrgeWdth As Single
Dim c As Range, cc As Range
Dim ma As Range

With Target
If .MergeCells And .WrapText Then
Set c = Target.Cells(1, 1)
cWdth = c.ColumnWidth
Set ma = c.MergeArea
For Each cc In ma.Cells
MrgeWdth = MrgeWdth + cc.ColumnWidth
Next
Application.ScreenUpdating = False
ma.MergeCells = False
c.ColumnWidth = MrgeWdth
c.EntireRow.AutoFit
NewRwHt = c.RowHeight
c.ColumnWidth = cWdth
ma.MergeCells = True
ma.RowHeight = NewRwHt
cWdth = 0: MrgeWdth = 0
Application.ScreenUpdating = True
End If
End With
End Sub

This is event code. Right-click on the sheet tab and "View Code".

Copy/paste the above into that sheet module.


Gord

On Tue, 29 May 2007 12:50:02 -0700, lnorswo
wrote:

Wrap Text is enabled in all the sheets and although I do not have a merged
cell in the row.... I do have one in that particular column. Can you
advise? I am no good with VBA code...

"Gord Dibben" wrote:

Do you have wrap text enabled?

Have you any merged cells in the range? Merged cells won't autofit without VBA
code.


Gord Dibben MS Excel MVP

On Tue, 29 May 2007 06:17:01 -0700, lnorswo
wrote:

When linking spreadsheets together into a rollup spreadsheet I can not get
the rows to autofit? Can anyone help?
Thank you so much...:)






All times are GMT +1. The time now is 02:16 AM.

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