I solved an issue with this - I had a row with two merged cells both containing multi-line text with Chr(10) linefeeds - with Wrap set ON (but no lines actually wrap - only the Chr(10)s cause new lines). Autofit wouldn't work due to the merged cells.
The VBA workaround was to use a spare cell on the same row, and fill it with the same number of Chr(10) as found in one (either) of the multi-line cells. Then call AutoFit for that cell now containing the same number of invisible line feeds. Make sure the font and size are the same in the spare cell!
' make C36 spare cell contain the same number of Chr(10) as D36, using a Repeat function :
' (after counting Chr(10) by comparing the length before and after substituting Chr(10) with "")
Worksheets(1).Range("C36").Value = _
Application.WorksheetFunction.Rept(Chr(10), _
Len(Worksheets(1).Range("D36").Value) - Len(Replace(Worksheets(1).Range("D36").Value, Chr(10), "")))
Worksheets(1).Range("C36").Rows.AutoFit
An alternative method for other scenarios could be to use an extra, hidden, worksheet - set a single cell to the same column width as your merged cells, copy the contents over, call autofit (which should work on the unmerged cell), then use the resulting rowheight from that one.