
Where are the options for Icon Sets and Data Bars in Google Sheets?
If you’re an experienced Excel user, you’ll know that there are a few great visualisation tools within Conditional Formatting. So you might be disappointed when you first look at the Conditional Formatting options in Google Sheets (in the Format menu). Colour Scale (heatmap) exists as an option, but Icon Sets and Data Bars are nowhere to be seen.
So how can you create something like image above? This post sets out how.
How to use Icon Sets in Google Sheets
To use Icon Sets in Google Sheets, you need to include them in a formula.
Firstly, you’ll need to isolate the icons you actually want to use. I like to use the small up/down indicators. You can generate these in Sheets by using = CHAR(9650) for the up (â–² ) icon and =CHAR(9660) for the down (â–¼) icon.
I tend to copy/paste special these so that I just have the icon, not the formula. That way, the final formula is easier to read.
You can then use an IF formula to control when these icons appear. In the example pictured, my formula looks at both the absolute variance and the % variance and displays an icon if the variance is more than £1K OR more than 10%, but you can make this much simpler if you like.
So the actual formula for the icons in column H is:
=IF(OR(F4>1000,G4>10%),”â–²”,IF(OR(F4<-1000,G4<-10%),”â–¼”,””))
You can then use Conditional Formatting (if you like) to colour the icons.
Data bars are actually Sparklines…
In Google Sheets, a data bar is actually a type of Sparkline. And just to confuse things further, in Google Sheets, you create Sparklines using a formula, rather than pressing a button.
When you use =SPARKLINE([data]) it automatically produces a little line chart but you can set it to “bar” and you’ll get something that looks a bit like a Data Bar. One further issue is that you also have to give it a Max axis length, otherwise all your data bars will come out the same length.
Hence my formula is:
=SPARKLINE(C20,{“charttype”,”bar”;”max”,MAX($C$20:$C$23)})
Be careful with the syntax; sparkline options appear between curly brackets, Each option needs two inputs – something that says what option is being added, together with the option. These pairs are then separated by a semicolon.
You can set an absolute value for the “max” option. However, I prefer to make it relative to the data I have, hence the formula.
Now, there is a further complication which is that this is no use if you have both positive and negative variances. The formula just looks at absolutes. I have found (and tested) this guide for how to create something more complex that does recreate the full Excel functionality, with negative variances showing as red to the left and positive as green to the right.
Hopefully this page has been useful to you if you are trying to create Icon Sets and Data Bars in Google Sheets. I provide bespoke Google Sheets training as well as Excel and Power Query training and consultancy, so please get in touch if you want to know more about how I can help you and your team.
If you want a quarterly newsletter summarising latest developments in Excel and other things I've found interesting or useful, please sign up here. I won't use your data for anything else.
