Hello All,
I am working on a piece of code that will look at a specific sheet and if there are merged cells present run a code to remove all merged cells and move a header, if no merged cells exist on the sheet then do nothing.
Here is what I've come up with but need the "Case" or "If/Then" code
Thanks in advance for any help on this.
I am working on a piece of code that will look at a specific sheet and if there are merged cells present run a code to remove all merged cells and move a header, if no merged cells exist on the sheet then do nothing.
Here is what I've come up with but need the "Case" or "If/Then" code
Code:
Sub ReOrgData()
Dim Sourcesht As Worksheet
Set Sourcesht = Sheets("AR Aging-Combined Property")
Sourcesht.Cells.Select
Selection.UnMerge
Range("B2:B4").Select
Selection.Cut
Range("A2").Select
ActiveSheet.Paste
Rows("7:7").Select
Selection.Delete Shift:=xlUp
Application.CutCopyMode = False
End Sub
Thanks in advance for any help on this.