Forse ti può aiutare questa routine:
Sub AutoFitMergedCellRowHeight()
'
'from:
http://www.exceltip.com/show_tip/Formating_in_VBA/Adjust_row_height_of_merged_cells_using_VBA_in_Microsoft_Excel/341.html
'
Dim CurrentRowHeight As Single, MergedCellRgWidth As Single
Dim ActiveCellWidth As Single, PossNewRowHeight As Single
Dim CurrCell As Range
If ActiveCell.MergeCells Then
With ActiveCell.MergeArea
If .Rows.Count = 1 And .WrapText = True Then
Application.ScreenUpdating = False
CurrentRowHeight = .RowHeight
ActiveCellWidth = ActiveCell.ColumnWidth
For Each CurrCell In Selection
MergedCellRgWidth = CurrCell.ColumnWidth +
MergedCellRgWidth
Next
.MergeCells = False
.Cells(1).ColumnWidth = MergedCellRgWidth
.EntireRow.AutoFit
PossNewRowHeight = .RowHeight
.Cells(1).ColumnWidth = ActiveCellWidth
.MergeCells = True
.RowHeight = IIf(CurrentRowHeight > PossNewRowHeight, _
CurrentRowHeight, PossNewRowHeight)
End If
End With
End If
Application.ScreenUpdating = True
End Sub
Seleziona le celle unite e lancia la routine: automaticamente il testo delle
celle unite viene giustificato e l'altezza aggiustata.
Se cerchi in questo forum il seguente messaggio:
From: =?Utf-8?B?cGF0cmlrMTEx?= <patr...@discussions.microsoft.com>
Subject: Adattamento automatico altezza riga non funziona su celle multiple
Date: Mon, 28 Jul 2008 03:46:01 -0700
troverai anche una soluzione modificata da Norman .
Se poi fai una ricerca con google sempre con questa routine come keyword
troverai parecchie altre risposte.
Fai sapere se risolvi.
Bruno