Closed Thread
Results 1 to 2 of 2

Highlight Cell per Condition

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Highlight Cell per Condition

    Please see attached sheet for referance to my problem.
    I need VBA Macro for followning problem.
    I have number of clients (column A) with monthly revenue as shown in attached sheet.
    The sheet will show you monthly revenue for cleints in Row 4 thru 134.
    What i want is to compare the revenue of each client from month to month and highlight the cell if the % increase or decrease is more then the value defined in field K1.
    Data Range J5:AL134
    Start comparing
    Row 5 K5 with J5
    L5 with K5
    M5 with L5.....so on until
    AL5 with AK5
    Row 6 K6 with J6....AL6 with AK6
    until
    Row 134 K134 with J134.....AL134 with AK134

    Need to highlight the cells with the following conditions;

    If % diff is > then K1 then highlight the cell with red
    If % diff is > 0 and less then K1 then highlight the cell with blue
    If % diff is < 0 then highlight with green

    This is how to calculate % diff :

    % Diff for Client on row 5 for Feb 06 would be:

    (k5-J5)*100/k5
    =(614.19-539.29)*100/614.19=12.19% hence hightlight cell K5 with Red

    and so on for all cells range J5:AL134


    please let me know if you have any questions.


    Thank U

    Riz MOmin
    Attached Files Attached Files

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Duplicate post

    http://www.excelforum.com/showthread.php?t=646367
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

Closed Thread

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