HI
I got the following code from a forum a while back. It finds merged cells, un merges them and fills in the cell value.
I got the following code from a forum a while back. It finds merged cells, un merges them and fills in the cell value.
Code:
[Sub UnMergeFill()
Dim cell As Range, joinedCells As Range
For Each cell In ThisWorkbook.ActiveSheet.UsedRange If cell.MergeCells Then
Set joinedCells = cell.MergeArea
cell.MergeCells = False
joinedCells.Value = cell.Value
End If
Next
End Sub/CODE]
It worked fine a couple of times but has more recently started running very very slowly and causing excel to become unresponsive.
I tried amending the code to turn off auto calculation at the start and switch it back on at the end. This has helped slightly and I can see the cells un merging but after a while Excel becomes unresponsive and I can't easily exit out of the code
I'm not sure if it is getting stuck in the loop? Any tweaks I can make to fix it?
Thanks in advance