+ Reply to Thread
Results 1 to 3 of 3

vba Highlight cells based on the values and count them

  1. #1
    Forum Contributor
    Join Date
    05-05-2020
    Location
    Germany
    MS-Off Ver
    2013
    Posts
    100

    vba Highlight cells based on the values and count them

    Hi,

    I have a table of data. I need to highlight the values less than the average red and highlight the values between average and maximum yellow and then count each one of them.

    I found a solution for the counting part with a function in vba. But I don't know about the highlighting part. I used the excel auto-Highlight but the count-function can't find the colored cell and won't work.

    Now I'm stuck. Since I'm going to have multiple other tables similar to this one but with different averages and maximums, I don't know what would be the best solution!

    I have attached an excel.

    Thank you in advance!
    Attached Files Attached Files

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: vba Highlight cells based on the values and count them

    For the data and sheet you've posted:

    Please Login or Register  to view this content.
    But, in this case, C25 and C26 are not the average and max of the data in the table.

    WBD
    Office 365 on Windows 11, looking for rep!

  3. #3
    Forum Contributor
    Join Date
    05-05-2020
    Location
    Germany
    MS-Off Ver
    2013
    Posts
    100

    Re: vba Highlight cells based on the values and count them

    Quote Originally Posted by WideBoyDixon View Post
    For the data and sheet you've posted:

    Please Login or Register  to view this content.
    But, in this case, C25 and C26 are not the average and max of the data in the table.

    WBD
    Thanks

    Yeah! I had to minimize the table because of the size limit that I could upload here.

+ 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. Conditional highlight based on values from multiple cells
    By gogumakilla in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-28-2016, 12:21 PM
  2. Formula to highlight values based on other cells with the same value
    By srpattrick in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-08-2015, 07:20 AM
  3. [SOLVED] Highlight 4 rows based on two cells values
    By sokeefe14 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-12-2015, 12:39 PM
  4. Highlight Cells based on its values
    By VKu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-05-2015, 05:48 AM
  5. 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
  6. [SOLVED] Count cells in row based on cell value, highlight row if wrong number or cells.
    By gutterball in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-11-2014, 04:00 PM
  7. [SOLVED] Count gaps between values and highlight cells
    By strabgus in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-17-2014, 02:26 PM

Tags for this Thread

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