Monday, 10 September 2012

Macro To Fill 56 Colors In First Column Of A Sheet

Macro To Fill 56 Colors In First Column Of A Sheet
'Break The Loop when x=10

Sub AddColor()
Dim X As Integer

For X = 1 To 56

ActiveSheet.Cells(X, 1).Interior.ColorIndex = X
If X = 10 Then Exit For     'Loop Breaks Here

Next X

End Sub

No comments:

Post a Comment

Follow Me by Email

ExcelKingdom-Popular Posts

ExcelKingdom-Random Posts