I have the following code: it works well enough, but when the column gets merged cell it turns out to be in error. If there is any way to avoid count for the merged cell or be more specific - to count only data that contain only 7 characters in column B:
Sub Second()
Range("B15:I15").Select
Selection.AutoFill Destination:=Range("B15:I" & Range("B" & Rows.Count).End(xlUp).Row)
End Sub'
If the merged cell is always at the last row then it is easy. All you need to do is use the
.MergeArea.Count
to check if the last cell is merged.Is this what you are trying?
And if you want to ignore the blank cell above the merged cell then, you can use this