I need a histogram in a cell based on condition.
Example: In:
My Out:
Needed Out:
So, If I'm using conditional formatting and choosing histogram, I have no option to choose the colour based on condition. My Output - this is what excel can suggest by basic tools. Needed Output - this is what I want to be suggested. Values < 0,85 - red histogram, < 0,95 - yellow, and < 1 - green.
CodePudding user response:
I've created a similar graph on one of my dashboards. My output:
You have to work backwards a bit, the red/yellow/green color is just a background color, and is set by conditional formatting based on value, and doesn't change in size. To give it the appearance that it is growing or shrinking, you need a grey/white bar conditional format that "covers" up the color on a right to left basis.
Blank bar conditional formatting:
In each of the "bar" cells, you'll just need to point to the % you want to use for each bar and subtract one. So = 1 - percentage
will give you the value that the blank bar conditional formatting will pick up.
I also used custom format ;;;
to hide the text in the cells:
Let me know if this works for your purposes!