+ Reply to Thread
Results 1 to 5 of 5

How to conditionally color rows

  1. #1
    Forum Contributor
    Join Date
    12-30-2012
    Location
    Israel
    MS-Off Ver
    2007, 2016
    Posts
    642

    How to conditionally color rows

    Hi everyone,

    I need to color in a different color each row, where I have more than 500 rows in my range.

    The loop below stops after about ~50 rows. I guess this is because VBA have just about 50 different colors.

    *My question: how to change the loop so it repeats the loop after finish the first 50 colors *

    P.S. I don't mind to have again colorindex = 3 after 47 different colors.

    Thanks!

    Please Login or Register  to view this content.
    Please * if you like the answer

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: How to conditionally color rows

    colour index is a value between 1 and 56.

    you need to add a line to test value of ci and reset it within the loop
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor
    Join Date
    12-30-2012
    Location
    Israel
    MS-Off Ver
    2007, 2016
    Posts
    642

    Re: How to conditionally color rows

    @Andy, can you please show me how to reset in from within?

    I guess that it has to include:
    Please Login or Register  to view this content.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: How to conditionally color rows

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    12-30-2012
    Location
    Israel
    MS-Off Ver
    2007, 2016
    Posts
    642

    Re: How to conditionally color rows

    Many thanks

+ 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. Conditionally changing tab color with VBA
    By dcphoto in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-25-2013, 01:23 PM
  2. Replies: 4
    Last Post: 09-15-2012, 02:46 PM
  3. Conditionally change tab color
    By laitsupport in forum Excel General
    Replies: 5
    Last Post: 11-11-2009, 04:28 AM
  4. Turn on tab color conditionally
    By jwwilli in forum Excel General
    Replies: 0
    Last Post: 10-23-2007, 11:41 AM
  5. [SOLVED] how can I conditionally change font color, or background color?
    By MOHA in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-21-2006, 01:57 PM
  6. [SOLVED] Conditionally color candles?
    By SamD in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 11-07-2005, 11:45 PM
  7. changing tab color conditionally
    By ldd in forum Excel General
    Replies: 1
    Last Post: 06-13-2005, 08:50 AM
  8. Changing color conditionally
    By bhalooneel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-06-2005, 12:05 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