I have a little problem in excel. I not experienced with excel macros and would be grateful for some help. I am trying to find a macro which ajustes the height of a merged c
What about this:
'rRang is range of cells which are merged together
Sub AutoFitRowMergedCells(rRang As Range)
Dim iColW As Integer, iColWold As Integer, I As Integer
iColW = 0
For I = 1 To rRang.Columns.Count
iColW = iColW + rRang.Range("A" & I).ColumnWidth
Next I
rRang.UnMerge
iColWold = rRang.Range("A1").ColumnWidth
rRang.Range("A1").ColumnWidth = iColW
rRang.Range("A1").EntireRow.AutoFit
rRang.Range("A1").ColumnWidth = iColWold
rRang.Merge
End Sub