View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default How to remove merged cells

Hi,

Right click the sheet tab, view code and paste this in.

Sub demergency()
With Selection
.MergeCells = False
.HorizontalAlignment = xlCenter
.EntireColumn.AutoFit
End With
End Sub

Select your range and run the code.

Mike

"Srikanth" wrote:

Hi,

Can any one clarify how to remove merged cells, autofit the data and center
align the contents by having a formula.

Thanks in advance