I have data in an Excel worksheet. Four of the columns have merged cells. I have to unmerge two columns ("A" and "D") and put data in the unmerged cells based on certain conditions. My attempt to unmerge specific column using following code did not unmerge the cells or return any error message
If sheet5.Range("A1", "A2783").MergeCells Then
sheet5.Range("A1", "A2783").MergeCells.UnMerge
Then I tried this
If ActiveSheet.Cells.MergeCells Then
sht.Cells.UnMerge
but that also did not unmerge the cells or return any error message.
Any pointers please?
Columns("A:A").UnMerge
you can't just unmerge A & D – Davesexcel