IBPM-APPS INDEX
face2face
- help
- tutorial
- references
- contact us
MACRO
USE CTRL+C TO COPY MACRO TEXT
Sub ColorMaps() 'Add this macro to your "personal macro workbook" Set Rng = Range("E5:XFD1048576") 'FORMAT OPTIONS Rows("1:1048576").Select With Selection .HorizontalAlignment = xlCenter .VerticalAlignment = xlBottom .Columns.AutoFit End With 'DELETE PREVIOUS FORMAT Cells.FormatConditions.Delete 'NON-POLAR CONTACTS With Rng.FormatConditions _ .Add(xlCellValue, xlEqual, "0.1") .Interior.Color = RGB(255, 250, 230) End With With Rng.FormatConditions _ .Add(xlCellValue, xlEqual, "0.2") .Interior.Color = RGB(255, 245, 204) End With With Rng.FormatConditions _ .Add(xlCellValue, xlEqual, "0.3") .Interior.Color = RGB(255, 235, 153) End With With Rng.FormatConditions _ .Add(xlCellValue, xlEqual, "0.4") .Interior.Color = RGB(255, 224, 102) End With With Rng.FormatConditions _ .Add(xlCellValue, xlEqual, "0.5") .Interior.Color = RGB(255, 214, 51) .Font.Color = RGB(255, 255, 255) End With With Rng.FormatConditions _ .Add(xlCellValue, xlEqual, "0.6") .Interior.Color = RGB(255, 204, 0) .Font.Color = RGB(255, 255, 255) End With With Rng.FormatConditions _ .Add(xlCellValue, xlEqual, "0.7") .Interior.Color = RGB(204, 163, 0) .Font.Color = RGB(255, 255, 255) End With With Rng.FormatConditions _ .Add(xlCellValue, xlEqual, "0.8") .Interior.Color = RGB(153, 122, 0) .Font.Color = RGB(255, 255, 255) End With With Rng.FormatConditions _ .Add(xlCellValue, xlEqual, "0.9") .Interior.Color = RGB(102, 82, 0) .Font.Color = RGB(255, 255, 255) End With 'POLAR CONTACTS With Rng.FormatConditions _ .Add(xlCellValue, xlEqual, "1.0") .Interior.Color = RGB(204, 224, 255) End With With Rng.FormatConditions _ .Add(xlCellValue, xlEqual, "2.0") .Interior.Color = RGB(153, 194, 255) End With With Rng.FormatConditions _ .Add(xlCellValue, xlEqual, "3.0") .Interior.Color = RGB(102, 163, 255) End With With Rng.FormatConditions _ .Add(xlCellValue, xlEqual, "4.0") .Interior.Color = RGB(51, 133, 255) End With With Rng.FormatConditions _ .Add(xlCellValue, xlEqual, "5.0") .Interior.Color = RGB(0, 102, 255) .Font.Color = RGB(255, 255, 255) End With With Rng.FormatConditions _ .Add(xlCellValue, xlEqual, "6.0") .Interior.Color = RGB(0, 82, 204) .Font.Color = RGB(255, 255, 255) End With With Rng.FormatConditions _ .Add(xlCellValue, xlEqual, "7.0") .Interior.Color = RGB(0, 61, 153) .Font.Color = RGB(255, 255, 255) End With With Rng.FormatConditions _ .Add(xlCellValue, xlEqual, "8.0") .Interior.Color = RGB(0, 41, 102) .Font.Color = RGB(255, 255, 255) End With With Rng.FormatConditions _ .Add(xlCellValue, xlEqual, "9.0") .Interior.Color = RGB(0, 20, 51) .Font.Color = RGB(255, 255, 255) End With 'POLAR&NON-POLAR CONTACTS With Rng.FormatConditions _ .Add(xlCellValue, xlBetween, "1.1", "1.3") .Interior.Color = RGB(214, 245, 214) End With With Rng.FormatConditions _ .Add(xlCellValue, xlBetween, "1.4", "1.9") .Interior.Color = RGB(171, 196, 171) End With With Rng.FormatConditions _ .Add(xlCellValue, xlBetween, "2.1", "2.3") .Interior.Color = RGB(173, 235, 173) End With With Rng.FormatConditions _ .Add(xlCellValue, xlBetween, "2.4", "2.9") .Interior.Color = RGB(138, 188, 138) End With With Rng.FormatConditions _ .Add(xlCellValue, xlBetween, "3.1", "3.3") .Interior.Color = RGB(133, 224, 133) End With With Rng.FormatConditions _ .Add(xlCellValue, xlBetween, "3.4", "3.9") .Interior.Color = RGB(106, 179, 106) End With With Rng.FormatConditions _ .Add(xlCellValue, xlBetween, "4.1", "4.3") .Interior.Color = RGB(92, 214, 92) End With With Rng.FormatConditions _ .Add(xlCellValue, xlBetween, "4.4", "4.9") .Interior.Color = RGB(74, 171, 74) End With With Rng.FormatConditions _ .Add(xlCellValue, xlBetween, "5.1", "5.3") .Interior.Color = RGB(51, 204, 51) .Font.Color = RGB(255, 255, 255) End With With Rng.FormatConditions _ .Add(xlCellValue, xlBetween, "5.4", "5.9") .Interior.Color = RGB(41, 163, 41) .Font.Color = RGB(255, 255, 255) End With With Rng.FormatConditions _ .Add(xlCellValue, xlBetween, "6.1", "6.3") .Interior.Color = RGB(36, 143, 36) .Font.Color = RGB(255, 255, 255) End With With Rng.FormatConditions _ .Add(xlCellValue, xlBetween, "6.4", "6.9") .Interior.Color = RGB(29, 114, 29) .Font.Color = RGB(255, 255, 255) End With With Rng.FormatConditions _ .Add(xlCellValue, xlBetween, "7.1", "7.3") .Interior.Color = RGB(26, 102, 26) .Font.Color = RGB(255, 255, 255) End With With Rng.FormatConditions _ .Add(xlCellValue, xlBetween, "7.4", "7.9") .Interior.Color = RGB(21, 82, 21) .Font.Color = RGB(255, 255, 255) End With With Rng.FormatConditions _ .Add(xlCellValue, xlBetween, "8.1", "8.3") .Interior.Color = RGB(20, 82, 20) .Font.Color = RGB(255, 255, 255) End With With Rng.FormatConditions _ .Add(xlCellValue, xlBetween, "8.4", "8.9") .Interior.Color = RGB(16, 66, 16) .Font.Color = RGB(255, 255, 255) End With With Rng.FormatConditions _ .Add(xlCellValue, xlBetween, "9.1", "9.3") .Interior.Color = RGB(10, 41, 10) .Font.Color = RGB(255, 255, 255) End With With Rng.FormatConditions _ .Add(xlCellValue, xlBetween, "9.4", "9.9") .Interior.Color = RGB(8, 33, 8) .Font.Color = RGB(255, 255, 255) End With 'SSE With Range("C3:XFD1048576").FormatConditions _ .Add(xlCellValue, xlEqual, "H") .Interior.Color = RGB(102, 102, 153) .Font.Color = RGB(255, 255, 255) End With With Range("C3:XFD1048576").FormatConditions _ .Add(xlCellValue, xlEqual, "G") .Interior.Color = RGB(157, 171, 138) .Font.Color = RGB(255, 255, 255) End With With Range("C3:XFD1048576").FormatConditions _ .Add(xlCellValue, xlEqual, "E") .Interior.Color = RGB(204, 255, 102) End With 'SPECIAL RESIDUES With Range("B2:XFD1048576").FormatConditions _ .Add(xlCellValue, xlEqual, "X") .Interior.Color = RGB(0, 0, 0) .Font.Color = RGB(255, 255, 255) End With End Sub