+ Reply to Thread
Results 1 to 2 of 2

Tricky Color Gradient Macros With Lines

  1. #1
    Registered User
    Join Date
    12-04-2007
    Posts
    30

    Tricky Color Gradient Macros With Lines

    Hello all

    I was hoping someone could help me with a macro i am trying to write.

    I have several horizontal lines of various lengths some overlap and some do not, on a single row as shown in attachment 1.

    Separating each of these lines so it is clearer to see where each line starts and stops - this is shown in attachment 2.

    Using these lines what i am trying to do is create a color gradient such that for each cell:

    1) where there is no line then the start color of the color gradient is green.
    2) where there is 1 line then the next color in the color gradient would be yellow
    3) where there is 2 lines that overlap then the color gradient would be orange
    4) where there is 3 lines that overlap then the color gradient would be red
    5) where there is 4 lines or more that are overlapping then the color gradient would be light blue.

    An example is shown in attachment 3.

    I can do most of this but the really tricky part is the start and stop position of each of the lines in a cell and how to count how many lines overlap.

    Can anyone of offer any solutions?

    Thank you.
    Attached Images Attached Images

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Tricky Color Gradient Macros With Lines

    Perhaps this will help
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

+ 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. Shape gradient color
    By TimlmiT in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-13-2020, 04:31 AM
  2. center the color gradient
    By sam612 in forum Excel General
    Replies: 7
    Last Post: 10-13-2017, 12:25 PM
  3. Apply gradient color in Error Bars
    By mindas99 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-26-2013, 11:01 AM
  4. How to get Gradient color value from a cell
    By mallick.rajat in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-17-2012, 02:19 AM
  5. Fixed color gradient
    By Hammer_757 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 04-17-2006, 02:49 PM
  6. [SOLVED] color gradient in a worksheet (not a chart), Is it Possible?
    By Jamnew in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-10-2005, 05:06 PM
  7. Color gradient becomes grey...
    By Foobi in forum Excel General
    Replies: 0
    Last Post: 02-11-2005, 04:35 AM

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