Hello Everyone,
I have an excel histogram chart, and I'm looking to make it in 2 forms:
For example stripes for one type of data and ordinary for other type of data.
Someone knows how to do that?
Hello Everyone,
I have an excel histogram chart, and I'm looking to make it in 2 forms:
For example stripes for one type of data and ordinary for other type of data.
Someone knows how to do that?
HI
I do not understand.
Could you be so kind as to attach an example of what you have and what you would like to obtain, perhaps handmade.
HI,
Mario
histograms.jpg
For example at the attachment:
I want some of the histograms to be stripes, and some remain smooth.
How can I do that?
Thanks
HI
I think it can only be done with VBA.
This is the code:
in This_WorkBook
and this in a Standard Module![]()
Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("B2")) Is Nothing Then Call ColorValue End If End Sub
Try changing the value in cell B2 of the attached file.![]()
Option Explicit Sub ColorValue() Dim ur As Long, i As Long Dim vAddressV As Range Dim aa As Double aa = Cells(2, 2).Value ActiveSheet.ChartObjects(1).Activate With ActiveChart.SeriesCollection(1) Set vAddressV = ActiveSheet.Range(Split(Split(.Formula, ",")(2), "!")(1)) For i = 1 To vAddressV.Cells.Count If aa <= vAddressV.Value2(i, 1) Then .Points(i).Select With Selection.Format.Fill .Visible = msoTrue .ForeColor.ObjectThemeColor = msoThemeColorAccent1 .ForeColor.TintAndShade = 0 .ForeColor.Brightness = 0 .BackColor.ObjectThemeColor = msoThemeColorBackground1 .BackColor.TintAndShade = 0 .BackColor.Brightness = 0 .Patterned msoPattern5Percent End With With Selection.Format.Fill .Visible = msoTrue .Patterned msoPatternDarkHorizontal End With Else .Points(i).Select With Selection.Format.Fill .Visible = msoTrue .ForeColor.RGB = RGB(79, 129, 189) .Solid End With With Selection.Format.Line .Visible = msoTrue .ForeColor.RGB = RGB(0, 112, 192) .Transparency = 0 End With End If Next i End With Cells(1, 1).Select End Sub
Let know. HI,
Mario
Hi,
Thank you very much for the help.
But is there another way to do this except VBA? I'm asking this because I'm not familiar with VBA.
The standard approach to getting different formatting in charts is to have different data series for each desired format. Technique explained here: https://peltiertech.com/conditional-...-excel-charts/ Note that most of the work is in the spreadsheet, dividing the data up by which ones you want to be smooth and which ones you want to be striped.
Will something like that work for you?
Originally Posted by shg
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks