+ Reply to Thread
Results 1 to 6 of 6

Formatting to stay with sorted data in Line Chart

  1. #1
    Registered User
    Join Date
    08-21-2017
    Location
    Budapest, Hungary
    MS-Off Ver
    2013
    Posts
    7

    Formatting to stay with sorted data in Line Chart

    Hello all,

    My problem: Say I have my data in A1:G5 and a Line Chart with 5 lines for each row. Now I format my lines, say I want the first to be red, second yellow, etc. Now I sort my data largest to smallest based on column G and now, the highest G value will have the red line, the second the yellow, not those for which I formatted. I want the formatting to stick with the line even after sorting, not to stay static on the table.
    This is important, because from time to time, I will add new data to the table, do the sorting based on new data, and want the colors to stay with the series I initially set.
    So far I couldn't find any solution to begin with, thanks for your support in afvance.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Formatting to stay with sorted data in Line Chart

    If you use conditional formatting so that the colours are generated by means of a formula based on a cell's contents, then the colours would follow the data even after sorting.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    08-21-2017
    Location
    Budapest, Hungary
    MS-Off Ver
    2013
    Posts
    7

    Re: Formatting to stay with sorted data in Line Chart

    Hello,

    Thanks for the answer, I'm talking about formatting the lines of the Line Chart, and setting those lines' colors, not the fill of the cells themselves.
    Can conditional formatting somehow be applied to the lines of a graph?

  4. #4
    Registered User
    Join Date
    08-21-2017
    Location
    Budapest, Hungary
    MS-Off Ver
    2013
    Posts
    7

    Re: Formatting to stay with sorted data in Line Chart

    Any ideas?

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Formatting to stay with sorted data in Line Chart

    The "standard" first suggestion for "conditional formatting" of charts is to make each "color" its own data series. Most of this work is in the spreadsheet. Suggested tutorial here: https://peltiertech.com/conditional-...-excel-charts/ I recommend you try that, and let us know where you get stuck or explain why this approach won't work for you.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  6. #6
    Registered User
    Join Date
    08-21-2017
    Location
    Budapest, Hungary
    MS-Off Ver
    2013
    Posts
    7

    Re: Formatting to stay with sorted data in Line Chart

    Thanks for the tip, i dont think i couldve solved it with that, but somehow it gave me an idea to make a "copy" where the lines are kept in order with vlookup from the original, no matter how i sort those, so i get what i whant, thx everyone

+ 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. Replies: 5
    Last Post: 12-07-2015, 03:14 PM
  2. Replies: 1
    Last Post: 12-20-2013, 06:15 AM
  3. Cololrs on individual bar charts won stay fixed when sorted
    By accelerator in forum Excel General
    Replies: 0
    Last Post: 01-20-2012, 04:08 AM
  4. Complex Chart:Need to have COLORS of BARS stay with designated data when I SORT
    By willandr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-04-2007, 05:30 PM
  5. [SOLVED] Excel-rolling data linked to chart & worksheet columns must stay
    By JJ in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 09-14-2005, 06:05 PM
  6. pivot table chart color formatting wont stay
    By confused in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 06-23-2005, 11:05 AM
  7. Formatting lines between data points in a line chart
    By ltanner in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 03-13-2005, 02:07 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