Vertical Bar Sparklines
A vertical bar sparkline, also called a vbar sparkline, is a compact chart that displays a single data value using a vertical bar. Similar to a mini bar chart, it visually represents magnitude and direction within a single cell—making it useful for comparing values across categories or time.
When to use vertical bar sparklines
- Comparing values across categories: Show relative size or performance of values across rows or time periods.
- Visualizing data distribution: Use bar height to quickly assess variation, with taller bars representing larger values.
- Tracking directional change: Show positive or negative shifts from a baseline within a small footprint.
Create a vertical bar sparkline
- On the Insert tab, select Sparklines.
- Under Bar Sparkline, select Insert Vbar Sparkline. The VbarSparkline Setting dialog opens.
- Enter a number or reference that defines the length of the bar, such as
0.3orA1. - Select the color scheme. The default is gray.
- Click Ok. The sparkline is inserted into the selected cell.
Edit a vertical bar sparkline
- Select the vertical bar sparkline in your workbook.
- On the Sparkline tab, select Settings. The VbarSparkline Setting dialog opens.
- Set the parameters, then click Ok.
- Copy and paste the sparkline cell to duplicate the configuration in another location, as needed.
Vertical bar sparkline parameters
| Parameter | Description |
|---|---|
| Value | Sets the value to display. Accepts a number or reference, such as 0.3 or A1.
|
| ColorScheme | Sets the color of the bar. Default is gray. |
| axisVisible | (Optional) Displays an axis line when selected. |
| barHeight | (Optional) Sets the height of the bar as a percentage of the cell height. Value must be greater than 0 and less than or equal to 1. |
| barWidth | (Optional) Sets the width of the bar as a percentage of the cell width. Value must be greater than 0 and less than or equal to 1. |
| LET function | (Optional) Defines dynamic formatting logic by assigning a color based on a calculated value using the LET function and nested IF conditions. |
➤ Example – Use LET to apply conditional colors
You can customize the bar color based on value ranges. The following example changes the bar color depending on the value in cell C3:
=LET(ref,C3,color,IF(ref>=0.8,"#092834",IF(ref>=0.6,"#347B98",IF(ref>0.4,"#66B032",IF(ref>=0.2,"#B2D732",IF(ref>=0,"#F0F7D4","red"))))),VBARSPARKLINE(ref,color,TRUE,0.4))