Skip to main content

Rangeblock Sparklines

Rangeblock sparklines are small visual indicators that display progress or status within a defined range. The sparkline uses a series of blocks, each representing a portion of the total range. Filled blocks represent the current value, making it easy to interpret performance or completion levels at a glance.

When to use rangeblock sparklines

  • Showing progress or status: Display how much of a goal or target has been completed.
  • Visualizing value ranges: Represent the spread of values in a range, including low, middle, and high points.
  • Comparing values within a range: Compare performance across different categories or time periods using consistent visual indicators.

Create a rangeblock sparkline

  1. On the Insert tab, select Sparklines.
  2. Under Other Sparkline, select Insert RangeBlock Sparkline. The RangeBlockSparkline Dialog opens.
  3. Set the parameters.
  4. Click Ok. The sparkline is inserted into the selected cell.

Edit a rangeblock sparkline

  1. Select the rangeblock sparkline in your workbook.
  2. On the Sparkline tab, select Settings. The RangeBlockSparkline Dialog opens.
  3. Adjust the parameters, then click Ok.
  4. Copy and paste the sparkline cell to duplicate the configuration in another location, as needed.

Rangeblock sparkline parameters

The rangeblock sparkline formula supports the following format:
=RANGEBLOCKSPARKLINE(template_range, data_expression)

ParameterDescription
Template RangeSpecifies the range reference for a range template.
Data Expression/RangeDefines the data object for the template. You can use a cell reference or the OBJECT function to supply the values.
Location RangeSets the cell where the sparkline is displayed.

Optional functions for rangeblock sparklines

You can optionally use the following functions to build rangeblock sparklines.

Example – Use rangeblock functions in a formula
To create a sparkline using the OBJECT, INDEX, and SEQUENCE functions:
=RANGEBLOCKSPARKLINE(TemplateSheet!A2:D14, OBJECT(incomeStatement[#Headers], INDEX(incomeStatement[#Data], 3, SEQUENCE(COUNTA(incomeStatement[#Headers]), 1))))

FunctionSyntaxDescription
OBJECT (1)OBJECT(property1, expression1, property2, expression2, ...)Defines an object with individual property-expression pairs.

  • property1 – A string or cell reference for the first property.
  • expression1 – A value or cell reference for the first property's value.
  • property2 – A string or cell reference for the second property.
  • expression2 – A value or cell reference for the second property's value.
OBJECT (2)OBJECT(properties_range, expressions_range)Defines an object using two parallel ranges.

  • properties_range1 – A range reference for the first set of properties.
  • expressions_range1 – A range reference with the same length as properties_range1.
  • properties_range2 – A second range of properties (same length as the first).
  • expressions_range2 – A second set of values (same length as the second property range).
OBJECT (3)OBJECT(property1, expressionArray1, property2, expressionArray2, ...)Defines an object with array values.

  • property1 – A string or cell reference.
  • expressionArray1 – An array reference for the property values.
  • property2 – A string or cell reference.
  • expressionArray2 – An array reference (same length as expressionArray1).
INDEXINDEX(return, row, col, area)Returns a value or cell reference from a range.

  • return – The range or array to search.
  • row – Row number to retrieve.
  • col – Column number to retrieve.
  • area – Specifies the area if multiple ranges are used.
SEQUENCESEQUENCE(rows,[columns],[start],[step])Returns a list of sequential numbers in ascending order, such as 1, 2, 3, 4, and so on. This function is typically used with hard-coded arguments to generate a specific sequence of values for a dynamic array formula.

  • rows – Number of rows in the sequence.
  • columns – (Optional) Number of columns. If omitted, defaults to 1.
  • start – (Optional) Starting value. If omitted, defaults to 1.
  • step – (Optional) Increment value. If omitted, defaults to 1.