Search code examples
google-sheetsbar-chartconditional-formatting

How to set the color of bars in bar chart based on certain condition in google sheet?


enter image description here

Hi everyone,

Is there any way to use another color for the bars where the count is more than Average count (cell E3)? Any help will be greatly appreciated!

Google sheet link: https://docs.google.com/spreadsheets/d/1SO36KvggYE6NgGAbvpbbB0qrhRLfBWMivRSUuOs6hNM/edit#gid=0


Solution

  • You do it through a trick by splitting column C into two columns depending on the codition

    E.g.

    1. Type into F3 =Arrayformula(IF(C3:C190>E3,C3:C190,"")) and into G3 =Arrayformula(IF(C3:C190<=E3,C3:C190,"")):

    enter image description here

    1. Modify your graph by replacing the series C2:C190 by the two series E2:E190 and CF:F190:

    enter image description here