Mergedcells can break lots of things. I only use them when I really, really
have to.
But how about something like:
Option Explicit
Sub testme01()
Dim myCell As Range
Dim myRng As Range
With ActiveSheet
Set myRng = .Range("f1", .Cells(.Rows.Count, "F").End(xlUp))
End With
For Each myCell In myRng.Cells
If IsEmpty(myCell) Then
'do nothing
Else
Application.DisplayAlerts = False
myCell.Resize(1, 3).Merge
Application.DisplayAlerts = True
End If
Next myCell
End Sub
accessuser1308 wrote:
I am trying to loop a macro in excel. The macro will merge, for example,
cells F3:H3. I want the macro to perform the merge for all rows that have
data in column F. Does anybody know what code will make this work? Thanks
in advance.
--
Dave Peterson
|