+ Reply to Thread
Results 1 to 12 of 12

Highlight each five rows with different colors

  1. #1
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Highlight each five rows with different colors

    Hello everyone
    I have numbers in E:N .. I need to deal with each five rows with different colors and the next five rows with the same different colors in order
    I put desired results in rows 4 : 8 & rows 9: 13 ..

    But sometimes there are more than five rows ... don't know how it can be adapted but we can rely on the merged cells in column A .. The maximum of these rows would be ten only

    I imagine to store arrays of colors (ten colors) and store the rgb values in this array and begin to deal with the merged cells .. Hope someone helps me


    Note that if there are no numbers then the row to be skipped and not colored
    If possible I need the same colors exactly ..using RGB if possible

    Thanks advanced for help
    Attached Files Attached Files
    Last edited by YasserKhalil; 01-20-2017 at 11:49 AM.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Highlight each five rows with different colors

    Hello YasserKhalil,

    My friend, you are already so good and well experienced in Excel.

    Is there any reason why you could not use Conditional Formatting?

    Regards.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Highlight each five rows with different colors

    Thanks Mr. Winon
    First I tried to solve using CF but couldn't figure it out
    Second, I have many issues in that thread not only one issue
    I am trying to solve it step by step

    I will restart the issue by imagining I will deal with only five rows for each and I need to store the colors (rgb colors) in an array like that
    Please Login or Register  to view this content.
    but don't know how to adapt that ...
    Thanks a lot for reply

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Highlight each five rows with different colors

    I am trying these lines as start point

    Please Login or Register  to view this content.
    But I got an error at last line

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Highlight each five rows with different colors

    As for this point I have overcome by using values instead of RGB values
    in this way
    Please Login or Register  to view this content.
    Now these ten colors would be the colors for each set (the set is related to column A merged cell ... for example : A14:A20 is a merged cell so these rows from 14 to 20 rows is one set which consists of 7 rows ... so the first seven colors of the array would be used

  6. #6
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Highlight each five rows with different colors

    Thank you for the reply YasserKhalil,

    What criteria or condition is to be met where, for a range of cells to be colored, to your requirement?

  7. #7
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Highlight each five rows with different colors

    Hi Yasser,

    Does it work for you?

    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  8. #8
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Highlight each five rows with different colors

    That's great and wonderful Mr. Sktneer
    Exactly as needed

    @Mr. Winon if there is a solution with CF, I welcome that as I needed to learn
    Need to adapt the different colors for each set as I illustrated

    Thanks a lot for great help

  9. #9
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Highlight each five rows with different colors

    You're welcome Yasser! Glad I could help.
    Thanks for the feedback.

  10. #10
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Highlight each five rows with different colors

    Hello YasserKhalil,

    @Mr. Winon if there is a solution with CF, I welcome that as I needed to learn
    Need to adapt the different colors for each set as I illustrated
    Due to the fragmented formulas with Conditional Formatting, in your specific requirement, I cannot post a prelude of same, or any Code, because VBA is not involved in this approach.

    However, I believe you will appreciate the workings of the attached Sample Workbook, without offending sktneer's nice Coding.

    Regards.
    Attached Files Attached Files

  11. #11
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Highlight each five rows with different colors

    Thanks a lot Mr. Winon for this great file. I liked it a lot
    You are great. Thank you very much

  12. #12
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Highlight each five rows with different colors

    Thank you for the feedback YasserKhalil,

    You are welcome, and I am glad you like it.

    Thank you for the "Rep", I really appreciate it!

    Have a great day.

    Kind Regards.
    Last edited by Winon; 01-21-2017 at 01:25 PM. Reason: Spelling

+ 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. Custom Buttons for Different Highlight Colors
    By wings1080 in forum Excel General
    Replies: 12
    Last Post: 09-29-2015, 04:11 PM
  2. [SOLVED] Highlight Duplicates with different colors
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-12-2014, 07:46 AM
  3. Highlight different words in different colors
    By Niclal in forum Word Formatting & General
    Replies: 8
    Last Post: 02-06-2014, 01:16 PM
  4. Replies: 1
    Last Post: 07-15-2010, 08:20 PM
  5. Highlight Cells Different Colors
    By juliajd in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-06-2009, 09:03 PM
  6. Replies: 1
    Last Post: 10-09-2008, 01:00 PM
  7. Highlight Duplicate Cells in Different Colors
    By dbla921 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-11-2008, 04:43 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