Results 1 to 3 of 3

HELP ME on Pie Chart Colours Based on Cell Colour Conditional Formatting

Threaded View

  1. #1
    Registered User
    Join Date
    08-10-2017
    Location
    Baler, Philippines
    MS-Off Ver
    MS Office 2016
    Posts
    8

    HELP ME on Pie Chart Colours Based on Cell Colour Conditional Formatting

    Sub ColorPies()
    Dim cht As ChartObject
    Dim i As Integer
    Dim vntValues As Variant
    Dim s As String
    Dim myseries As Series
     
        For Each cht In ActiveSheet.ChartObjects
            For Each myseries In cht.Chart.SeriesCollection
      
                If myseries.ChartType <> xlPie Then GoTo SkipNotPie
                s = Split(myseries.Formula, ",")(2)
                vntValues = myseries.Values
                
                For i = 1 To UBound(vntValues)
                    myseries.Points(i).Interior.Color = Range(s).Cells(i).Interior.Color
                Next i
    SkipNotPie:
            Next myseries
        Next cht
    End Sub
    Last edited by Pepe Le Mokko; 09-14-2019 at 12:12 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Conditional Formatting to colour rows ia possible 3 different colours
    By Ortz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-18-2016, 06:32 PM
  2. Replies: 6
    Last Post: 04-11-2016, 09:48 AM
  3. [SOLVED] Conditional Formatting - creating rules based on colours in cell list
    By milkychips in forum Excel General
    Replies: 5
    Last Post: 01-02-2016, 12:00 PM
  4. [SOLVED] Using/finding the colours from Conditional Formatting Colour Scales
    By I-Like-Excel in forum Excel General
    Replies: 2
    Last Post: 09-23-2015, 10:02 PM
  5. Conditional formatting based on other cell colours
    By Smally in forum Excel General
    Replies: 2
    Last Post: 07-03-2014, 06:40 AM
  6. [SOLVED] Conditional Formatting for Chart Series Based on Cell Colour
    By benjthom in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-20-2013, 05:32 AM
  7. [SOLVED] VBA for conditional formatting colour fill (15 colours) in 2003
    By Russell Dawson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-06-2012, 03:18 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