Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub Cement()
- Dim cell As Range
- Dim selRange As Range
- For Each cell In Range("L5:AJ370")
- If cell.DisplayFormat.Interior.Color <> cell.Interior.Color Then
- If selRange Is Nothing Then
- Set selRange = cell
- Else
- Set selRange = Union(selRange, cell)
- selRange.Copy
- End If
- End If
- Next
- If Not selRange Is Nothing Then selRange.Select
- Range("L5:AJ5").Select
- Selection.PasteSpecial xlPasteValues
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement