+ Reply to Thread
Results 1 to 4 of 4

Changing the color of a bar based on the color of a cell.

  1. #1
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    651

    Changing the color of a bar based on the color of a cell.

    I found this example online and its great but I need to add another ability.

    I would like to be able to change the value of D2 to be 1, or 2, or 3 and so on that will tell the macro WHICH col to use for the coloring of the chart.

    Thank you.
    Attached Files Attached Files

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Changing the color of a bar based on the color of a cell.

    You would need to code an algorithm for each number that Identifies the fill color(s) and where the colors are applied. Something like a Select Case statement.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,743

    Re: Changing the color of a bar based on the color of a cell.

    Hi

    Check attached file.
    You can change chart colors by cell D2 (1,2,3 as red, green, blue)

    Please Login or Register  to view this content.

    or doubleClick on region in col A then chart change color to region cell color.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  4. #4
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    651

    Re: Changing the color of a bar based on the color of a cell.

    thank you for your help on this!!!

+ 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. [SOLVED] Changing Text Changes Color and Counting Based On Color
    By Quivolt in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 06-05-2017, 02:06 PM
  2. [SOLVED] Changing Text Changes Color and Counting Based On Color
    By Quivolt in forum Excel General
    Replies: 3
    Last Post: 06-03-2017, 12:36 PM
  3. Any way to apply a color theme by changing the color of one cell ?
    By KomicJ in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-02-2016, 01:11 PM
  4. Replies: 3
    Last Post: 08-18-2014, 12:47 PM
  5. [SOLVED] Changing fill color of shapes based on changing cell value
    By Stefan1983 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-25-2012, 10:33 AM
  6. Changing a cell's color based on it's color and the value of another cell
    By lorr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-05-2012, 01:09 PM
  7. macro: changing color of coloumn header based on rows color
    By rajaid in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-22-2009, 06: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