Hi All,
I have a requirement to draw a pareto chart based on cell color occurance in the excel sheet and show the number of counts along with their legend names.
The colour for specefic term are shown in legends,so we need to search for those colours in excel sheet and draw pareto map accordinly.
I have attached an excel sheet for better understanding....pls let me know if this can be done...
Regards
Ashesh
You need a user defined function to count the cells colour.
Put in a standard code module.
In cell CC31 use the formulaFunction CountColor(Data As Range, BasedOn As Range) As Long Dim rngCell As Range Dim lngCount As Long For Each rngCell In Data.Cells If rngCell.Interior.Color = BasedOn.Interior.Color Then lngCount = lngCount + 1 End If Next CountColor = lngCount End Function
=CountColor($C$2:$BS$80,BU31)
copy down to CC51
Create a bar chart on the labels in CC and data in BU
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks