Bernie,
Some times this code unmerges cells but removes data that is supposed to be
spread. Also, i can not get excel to transpose the copy cells. It give me
an error stating that the cells are not the same shape and size. Any
suggestions? Thanks for the speady help!
Bernie Deitrick wrote:
rtwiss,
Try the macro below.
HTH,
Bernie
MS Excel MVP
Sub UnMergeAllCells()
Dim myC As Range
Dim myR As Range
Dim myV As Variant
Dim myM As Range
For Each myC In ActiveSheet.UsedRange.SpecialCells(xlCellTypeVisib le)
If myC.MergeCells Then
Set myM = myC.MergeArea
myV = myC.Value
myC.UnMerge
For Each myR In myM
myR.Value = myV
Next myR
End If
Next myC
End Sub
Can anyone help me with this. I have two parts of the program. Here they
a
[quoted text clipped - 26 lines]
End Sub
--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200810/1