Results 1 to 5 of 5

Coloring cell based on condition

Threaded View

  1. #1
    Registered User
    Join Date
    01-15-2009
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    8

    Coloring cell based on condition

    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
    Last edited by rajaid; 01-27-2009 at 09:06 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1