Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Macro Set Background Color of a Cell

In certain cases we want to give visibility to users while interactive planning. This could be comparing different key figures, could be value for
key figures (example >5000) etc. If the value exceeds then user needs to see the same in real time. This could be achieved by setting the
background color of a cell to different color.

For this we will define a macro using CELL_BG function. In the below example we are comparing one key figure to another and if value is
greater then other KF the cell of that key figure will turn RED. Define the macro as default macro.

Lets see the effect of macro. As we can see; when the value in composite forecast is greater then production forecast the color of that
specific cell changes to RED.

For different colors here are the values which you can maintain in macro:

Black if X = 0
Blue if X = 1

White if X = 2

Yellow if X = 3
Cyan if X = 4

Green if X = 5

Red if X = 6
Magenta if X = 7
Deep blue if X = 8
Gray if X = 9

Bright yellow if X = 10

Intensive cyan if X = 11
Intensive green if X = 12

Deep red if X = 13
Deep magenta if X = 14

You might also like