Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Merged Cells Removing 1

Status
Not open for further replies.

robcarr

Programmer
May 15, 2002
633
GB
Dear All,

I have to paste approx 400 rows most days into a sheet, on the odd occassion the data I am pasting contains merged cells, I then have to sort the data, when I try to sort the data, it says "merged cells need to be indentical" (or similar). I was hoping I could run some coding and if it finds a merged cell(s), it removes the merge, the data in the merge cells is always blank, can anyone help with this.
Thanks
 
Simply put this bit of code into the top of your code to unmerge the cells.

Cells.UnMerge
 
thanks for doing this, really simple really.

rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top