Sub findFirstColoredCellAndExileIt()
Dim rowStart As Integer
Dim rowEnd As Long
rowStart = 1
rowEnd = ActiveSheet.Cells(Rows.count, "A").End(xlUp).Row
For x = rowStart To rowEnd Step 1
If Cells(x, 1).Interior.ColorIndex <> xlColorIndexNone Then
Cells(1, 5).Value = Cells(x, 1)
Exit For
End If
Next x
End Sub
Sub findFirstColoredCellAndExileIt()
Dim rowStart As Integer
Dim rowEnd As Long
rowStart = 1
rowEnd = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row
For x = rowStart To rowEnd Step 1
If Cells(x, 1).Interior.ColorIndex <> xlColorIndexNone Then
Cells(x, 1).Copy
Cells(1, 5).PasteSpecial xlPasteFormats
Application.CutCopyMode = False
Exit For
End If
Next x
End Sub
Sub findFirstColoredCellAndExileIt()
Range("N4").Select
ActiveCell.FormulaR1C1 = "x"
Range("N5").Select
ActiveCell.FormulaR1C1 = "x"
Range("N6").Select
ActiveCell.FormulaR1C1 = "x"
Range("N7").Select
ActiveCell.FormulaR1C1 = "x"
Range("N8").Select
ActiveCell.FormulaR1C1 = "x"
Range("N9").Select
ActiveCell.FormulaR1C1 = "x"
Range("N10").Select
ActiveCell.FormulaR1C1 = "x"
Range("N11").Select
ActiveCell.FormulaR1C1 = "x"
Range("N12").Select
ActiveCell.FormulaR1C1 = "x"
Range("N13").Select
ActiveCell.FormulaR1C1 = "x"
Range("N14").Select
ActiveCell.FormulaR1C1 = "x"
Range("N15").Select
ActiveCell.FormulaR1C1 = "x"
Range("N16").Select
ActiveCell.FormulaR1C1 = "x"
Range("N17").Select
ActiveCell.FormulaR1C1 = "x"
Dim rowStart As Integer
Dim rowEnd As Long
rowStart = 1
rowEnd = ActiveSheet.Cells(Rows.Count, "N").End(xlUp).Row
For X = rowStart To rowEnd Step 1
If Cells(X, 14).Interior.ColorIndex <> xlColorIndexNone Then
Cells(X, 14).Copy
Cells(3, 18).PasteSpecial xlPasteFormats
With Selection
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
End With
Application.CutCopyMode = False
Exit For
End If
Next X
Range("N4:N17").Select
Selection.ClearContents
Range("N4").Select
End Sub