Hi,
I had an report and the rows of the report needs to be colored based on another cell value.
My layout looks like this :
A1 B1 C1 D1 AVG
10 11 12 13 30
14 15 16 17 100
18 19 20 21 400
For each cell, i need to compare the value of cell with that value in AVG coloumn and if condition is met, cell should be colored.
Eg : If first cell value under A1 is Less than 0.2 * AVG of first row then color of the cell A2 should be red.
After coloring the entire rows, then i should check and color the header row based on the color of Rows.
I tried first one, i,e coloring the rows based on conditional formatting and then written VB code to compare the color of rows and colored the header row. But the color index used in conditional formatting and the code are mismatching and the desired output is not coming.So decided to write code for coloring the rows cell.
Could you please provide sample coding as how to color of Rows based on the condition, i.e reading each cell with that AVG coloumn.
Thanks & Regards,
Raj
Bookmarks