Sub ColourTable() ' ' Macro by Victoria Barclay ' I'm tired of guessing the colour codes! This will ' create a little colour table right where & when I need it. ' iResponse = MsgBox("This will create a little 8 col X 5 row colour table (with codes) at the cell you have selected. Continue?", vbYesNo) If iResponse = vbNo Then Exit Sub End If ' XXXXXXXXXXX Reds ActiveCell.Offset(0, 0).FormulaR1C1 = "1" Selection.Font.ColorIndex = 2 With Selection.Interior .ColorIndex = 1 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "9" Selection.Font.ColorIndex = 2 With Selection.Interior .ColorIndex = 9 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "3" Selection.Font.ColorIndex = 2 With Selection.Interior .ColorIndex = 3 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "7" Selection.Font.ColorIndex = 1 With Selection.Interior .ColorIndex = 7 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "38" Selection.Font.ColorIndex = 1 With Selection.Interior .ColorIndex = 38 .Pattern = xlSolid End With ' XXXXXXXXXXXXX Oranges ActiveCell.Offset(-4, 1).Select ActiveCell.FormulaR1C1 = "53" Selection.Font.ColorIndex = 2 With Selection.Interior .ColorIndex = 53 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "46" Selection.Font.ColorIndex = 2 With Selection.Interior .ColorIndex = 46 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "45" Selection.Font.ColorIndex = 2 With Selection.Interior .ColorIndex = 45 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "44" Selection.Font.ColorIndex = 1 With Selection.Interior .ColorIndex = 44 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "40" Selection.Font.ColorIndex = 1 With Selection.Interior .ColorIndex = 40 .Pattern = xlSolid End With ' XXXXXXXXXXXX Yellows ActiveCell.Offset(-4, 1).Select ActiveCell.FormulaR1C1 = "52" Selection.Font.ColorIndex = 2 With Selection.Interior .ColorIndex = 52 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "12" Selection.Font.ColorIndex = 2 With Selection.Interior .ColorIndex = 12 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "43" Selection.Font.ColorIndex = 2 With Selection.Interior .ColorIndex = 43 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "6" Selection.Font.ColorIndex = 1 With Selection.Interior .ColorIndex = 6 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "36" Selection.Font.ColorIndex = 1 With Selection.Interior .ColorIndex = 36 .Pattern = xlSolid End With ' XXXXXXXXXX Greens ActiveCell.Offset(-4, 1).Select ActiveCell.FormulaR1C1 = "51" Selection.Font.ColorIndex = 2 With Selection.Interior .ColorIndex = 51 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "10" Selection.Font.ColorIndex = 2 With Selection.Interior .ColorIndex = 10 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "50" Selection.Font.ColorIndex = 2 With Selection.Interior .ColorIndex = 50 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "4" Selection.Font.ColorIndex = 1 With Selection.Interior .ColorIndex = 4 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "35" Selection.Font.ColorIndex = 1 With Selection.Interior .ColorIndex = 35 .Pattern = xlSolid End With ' XXXXXXXXXXXXX Cyan ActiveCell.Offset(-4, 1).Select ActiveCell.FormulaR1C1 = "49" Selection.Font.ColorIndex = 2 With Selection.Interior .ColorIndex = 49 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "14" Selection.Font.ColorIndex = 2 With Selection.Interior .ColorIndex = 14 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "42" Selection.Font.ColorIndex = 2 With Selection.Interior .ColorIndex = 42 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "8" Selection.Font.ColorIndex = 1 With Selection.Interior .ColorIndex = 8 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "34" Selection.Font.ColorIndex = 1 With Selection.Interior .ColorIndex = 34 .Pattern = xlSolid End With ' XXXXXXXXXXX Blues ActiveCell.Offset(-4, 1).Select ActiveCell.FormulaR1C1 = "11" Selection.Font.ColorIndex = 2 With Selection.Interior .ColorIndex = 11 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "5" Selection.Font.ColorIndex = 2 With Selection.Interior .ColorIndex = 5 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "41" Selection.Font.ColorIndex = 2 With Selection.Interior .ColorIndex = 41 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "33" Selection.Font.ColorIndex = 1 With Selection.Interior .ColorIndex = 33 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "37" Selection.Font.ColorIndex = 1 With Selection.Interior .ColorIndex = 37 .Pattern = xlSolid End With ' XXXXXXXXXXXXXX Magentas ActiveCell.Offset(-4, 1).Select ActiveCell.FormulaR1C1 = "55" Selection.Font.ColorIndex = 2 With Selection.Interior .ColorIndex = 55 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "47" Selection.Font.ColorIndex = 2 With Selection.Interior .ColorIndex = 47 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "13" Selection.Font.ColorIndex = 2 With Selection.Interior .ColorIndex = 13 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "54" Selection.Font.ColorIndex = 2 With Selection.Interior .ColorIndex = 54 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "39" Selection.Font.ColorIndex = 1 With Selection.Interior .ColorIndex = 39 .Pattern = xlSolid End With ' XXXXXXXXXXXXXX Greys ActiveCell.Offset(-4, 1).Select ActiveCell.FormulaR1C1 = "56" Selection.Font.ColorIndex = 2 With Selection.Interior .ColorIndex = 56 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "16" Selection.Font.ColorIndex = 2 With Selection.Interior .ColorIndex = 16 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "48" Selection.Font.ColorIndex = 2 With Selection.Interior .ColorIndex = 48 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "15" Selection.Font.ColorIndex = 1 With Selection.Interior .ColorIndex = 15 .Pattern = xlSolid End With ActiveCell.Offset(1, 0).Select ActiveCell.FormulaR1C1 = "2" Selection.Font.ColorIndex = 1 With Selection.Interior .ColorIndex = 2 .Pattern = xlSolid End With End Sub