Avatar of Andreas Hermle
Andreas Hermle
Flag for Germany asked on

Conditionally format data series based on value

Dear Experts:

A macro should change the formatting for some custom named charts on the active Worksheet as follows:

Data Series that start in 2015 should have a different fill (RGB 230, 185, 184)

All of these charts are bar charts with just one data series

Not all of the charts of the active worksheet have to be formatted this way, but charts with the name 'MyChart_1', 'MyBizChart' and 'ProChart' (and other ones the names of which I will be able to enter into the provided macro code)

conditionally-format-data-series.png
Help is much appreciated. Thank you very much in advance.

I have attached a sample file for your convenience.

Regards, Andreas
Conditionally-format-data-series.xls
Microsoft ExcelVBA

Avatar of undefined
Last Comment
Saurabh Singh Teotia

8/22/2022 - Mon
Saurabh Singh Teotia

Their you go enclosed is your workbook for your reference..where i did what you are looking for but i did without macro..this is conditional formatting only by the way I'm arranging my data and this will do what you are looking for as i tweaked your graphs only...

Saurabh...
Conditionally-format-data-series.xls
Andreas Hermle

ASKER
Hi Saurab,

astonishingly nice workaround, thank you very much for it, but to be honest with you, I would favor a macro solution. Maybe you will be able to provide me even a macro code.

Andreas
Saurabh Singh Teotia

Andreas,

Any particular reason you are looking to this only by code??

Saurabh...
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Andreas Hermle

ASKER
Actually no specific reason
Saurabh Singh Teotia

The reason i asked this question is because if i provide a macro solution for this i will be reading the range only from which you are preparing the chart and then coloring the series value accordingly...

Let me know if you are fine with the same and will write a macro for you...
Andreas Hermle

ASKER
Hi Saurabh, great, this is ok, no problem, thank you very much in advance.

Regards, Andreas
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Saurabh Singh Teotia

I'm confused whether you want me to write a macro or you are good with current solution??
Andreas Hermle

ASKER
oh sorry that I confused you, yes I would be very glad if you could write a macro for me.

Regards, Andreas
ASKER CERTIFIED SOLUTION
Saurabh Singh Teotia

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Andreas Hermle

ASKER
Hi Saurabh,

great, works just fine, thank you very much for your professional job. I really appreciate it.

Regards, Andreas
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Saurabh Singh Teotia

Yw.. Glad to help.. :-)