Originally Posted by
estatefinds
(But only the data that is highlighted)
Try (adapted from Leith's code):
Sub TestA_v2()
Dim Cll As Range
Dim n As Long
Application.ScreenUpdating = False
With ActiveSheet
For Each Cll In .Range("E1:AL9548").SpecialCells(xlCellTypeConstants, 3)
If Cll.Interior.ColorIndex <> xlNone Then
n = n + 1
Cll.Copy .Cells(n, "AN")
End If
Next Cll
End With
Application.ScreenUpdating = True
End Sub
It assumes all values in the source range are plain values and not the result of formulae. Also that 'higlighted' means any background colour other than none.
By the way your existing code can be shortened/simplified:
Sub mtcs2()
Dim i As Long, arrSource, destnrng As Range, v
With ActiveSheet
arrSource = Range(.Cells(1, 1), .Cells(.Rows.Count, 1).End(xlUp))
Set destnrng = Range("B1").Resize((UBound(arrSource) + 1) / 3, 3)
i = 1
For Each v In arrSource
destnrng.Cells(i) = v
i = i + 1
Next v
End With
End Sub