Stack cluster column chart

seryf

New Member
Joined
Aug 3, 2023
Messages
3
Office Version
  1. 2021
Platform
  1. Windows
Hello guys, I would like to create Stack clusted columm chart but I cant really get the vba code of it.
I know, how to do it manually, but when I start to create a code of it everything is going wrong.
I have 6 cells, 3 in column B and 3 in column C
I need to make graph with 2 column, first column should be called IN and should be consider of values from all cells. This column should be seperated to different colors which should demonstrate data from these cells.
For example if B2 would be 5, B3 7 and B4 8, I need to create column with value 20 and seperate that column by colors to three parts with values 5,7,8
Best what i could do was to create 6 column which each values comparing to each other.
Like I said, i know how to do it manually but although I record macro when I do it manually and implement datas from there to my complete macro, it makes only that 6 columns, not 2
Can somebody help me out?

This is what i want (not exactly, i want to have it from 6 different series, not only from 3)
1691228884880.png




this is what i get via vba

1691228957307.png

Upload Image
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

Forum statistics

Threads
1,215,069
Messages
6,122,954
Members
449,095
Latest member
nmaske

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top