microsoft_excel:macros:change_color
Differences
This shows you the differences between two versions of the page.
microsoft_excel:macros:change_color [2021/08/04 14:01] – created peter | microsoft_excel:macros:change_color [2021/08/04 14:36] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Microsoft Excel - Macros - Change Color ====== | ||
- | Navigate to **View -> Macros -> Create Macro**. | ||
- | |||
- | < | ||
- | Sub ChangeColour() | ||
- | Dim rCell As Range | ||
- | If Selection.Cells.Count = 1 Then | ||
- | MsgBox " | ||
- | Exit Sub | ||
- | End If | ||
- | For Each rCell In Selection | ||
- | If rCell.Interior.Color = RGB(255, 192, 0) Then ' | ||
- | rCell.Interior.Color = RGB(128, 100, 162) ' | ||
- | | ||
- | rCell.Interior.Color = RGB(253, 233, 217) 'pink | ||
- | | ||
- | rCell.Interior.Color = RGB(197, 217, 241) 'blue | ||
- | End If | ||
- | Next rCell | ||
- | End Sub | ||
- | </ | ||
- | |||
- | Once Macro is created, select range of cells and then run Macro. |
microsoft_excel/macros/change_color.1628085672.txt.gz · Last modified: 2021/08/04 14:01 by peter