+ Reply to Thread
Results 1 to 21 of 21

Change colour of chart series with VBA

Hybrid View

esbencito Change colour of chart series... 10-16-2017, 03:08 AM
NickyC Re: Change colour of chart... 10-16-2017, 04:52 AM
esbencito Re: Change colour of chart... 10-16-2017, 05:07 AM
NickyC Re: Change colour of chart... 10-16-2017, 05:56 AM
esbencito Re: Change colour of chart... 10-16-2017, 06:18 AM
NickyC Re: Change colour of chart... 10-16-2017, 09:15 PM
esbencito Re: Change colour of chart... 10-16-2017, 10:39 PM
NickyC Re: Change colour of chart... 10-16-2017, 11:16 PM
esbencito Re: Change colour of chart... 10-16-2017, 11:48 PM
humdingaling Re: Change colour of chart... 10-17-2017, 12:04 AM
esbencito Re: Change colour of chart... 10-17-2017, 12:31 AM
humdingaling Re: Change colour of chart... 10-17-2017, 12:31 AM
esbencito Re: Change colour of chart... 10-17-2017, 01:03 AM
humdingaling Re: Change colour of chart... 10-17-2017, 12:34 AM
NickyC Re: Change colour of chart... 10-17-2017, 12:46 AM
humdingaling Re: Change colour of chart... 10-17-2017, 01:23 AM
esbencito Re: Change colour of chart... 10-17-2017, 02:08 AM
humdingaling Re: Change colour of chart... 10-17-2017, 03:05 AM
esbencito Re: Change colour of chart... 10-17-2017, 03:25 AM
humdingaling Re: Change colour of chart... 10-17-2017, 06:55 PM
esbencito Re: Change colour of chart... 10-17-2017, 10:06 PM
  1. #1
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Change colour of chart series with VBA

    Hi
    unfortunately your combo box links to a file on your C:\ drive, so I can't see how it works exactly.
    assuming your combobox links to a range containing colours, and the first of these cells is the blue you want to replace (as on your second sheet) then assuming your colour range has the name "ColRange", and the output cell is names OutRange, try this

    Sub ColChange()
    Dim ss, MyCol, Bcol
    MyCol = Range("ColRange").Cells(Range("Outrange").Value).Interior.Color
    Bcol = Range("ColRange").Cells(1).Interior.Color
    
    For Each ss In ActiveChart.SeriesCollection
        If ss.Format.Line.ForeColor.RGB = Bcol Then ss.Format.Line.ForeColor.RGB = MyCol
    Next ss
    End Sub
    Last edited by NickyC; 10-16-2017 at 05:57 AM. Reason: remove msgbox check

+ 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. Chart Series Automatic Colour
    By AndersonM in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 06-01-2016, 06:37 AM
  2. VBA to change column chart series colour
    By Jabba69 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-29-2014, 11:51 AM
  3. [SOLVED] Change series colour for all charts on a worksheet.
    By DonaldDump in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-28-2013, 06:12 PM
  4. Colour change column chart based on cell colour
    By Alice21 in forum Excel General
    Replies: 11
    Last Post: 04-05-2011, 10:10 AM
  5. Change colour of chart series
    By downunderthunder in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-06-2010, 09:20 PM
  6. Stacked Area Chart Series Colour Change
    By downunderthunder in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-06-2010, 09:18 PM
  7. Conditional Series Collection Colour for Chart
    By benno87 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-24-2009, 09:54 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