+ Reply to Thread
Results 1 to 2 of 2

Highlight cells based on sum > value in another column - loop

  1. #1
    Forum Contributor
    Join Date
    12-18-2011
    Location
    long island
    MS-Off Ver
    365
    Posts
    236

    Highlight cells based on sum > value in another column - loop

    Hello,

    Im trying to write a macro to take care of highlighting cells in column E based on the following:
    For each unique value in column D, if the sum of cells in column F are greater than the values in column W (average or first value), highlight E.
    For column F, the macro needs to check if the first value is greater. If not, continue to the next value and add to the last value and check if it is greater again. When the sum is greater, highlight the corresponding cells in E. Continue for all unique values in column D.

    Attached is an example workbook, with one sheet pre-highlighted to help illustrate my thinking. Also, a jpeg showing the logic.

    This sheet has about 100 rows, but my actual sheet contains about 2000.

    Thank you for any help!
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,869

    Re: Highlight cells based on sum > value in another column - loop

    I believe that what you want could be done using a conditional formatting formula.
    1. Select cells E2:E102
    2. Paste the following into the Format values where this formula is true window:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Highlight Cells based on a date in another column
    By highlandranger in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-19-2020, 02:49 AM
  2. Replies: 5
    Last Post: 01-12-2017, 04:34 AM
  3. Highlight cells in the first column of each sheet based on a list
    By rafuk73 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-19-2015, 02:54 PM
  4. Highlight all cells in a column based on values in two different cells
    By lbrasfield in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-26-2014, 06:26 AM
  5. Replies: 5
    Last Post: 09-24-2012, 05:14 PM
  6. Replies: 23
    Last Post: 09-25-2009, 07:39 PM
  7. Replies: 1
    Last Post: 09-19-2009, 08:09 PM

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