I am trying to create an Excel macro that will search all rows in a spreadsheet, and if the rows contain merged cells, delete them. I am using the following code...I don't get any error messages, but rows containing merged cells are not deleted. Any help is appreciated!
Dim lastrow As Long
lastrow = ActiveSheet.UsedRange.Rows.Count
For r = 1 To lastrow Step 1
If Rows(r).MergeCells = True Then