ExcelFormulas logoExcelFormulas.
Ask AI
Google SheetsVerified QA Tested

SPARKLINE.

Generates a miniature chart within a single spreadsheet cell.

How it works.

SPARKLINE creates an in-cell mini trend graph (line, bar, column) inside a single cell to visualize patterns and metrics at a glance.

Formula syntax.

Standard Excel Notation
=SPARKLINE(data, [options])
Tip:Arguments wrapped in square brackets [like_this] are optional; all other arguments are required.

Formula arguments.

Every parameter accepted by the SPARKLINE function is detailed below.

dataRequired

The range of numbers to chart.

Example value: A2:D2
optionsOptional

Optional key-value parameters enclosed in curly brackets (e.g. charttype, color).

Example value: {"charttype", "bar"}

Simple example.

Step-by-Step Scenario

Quarterly Revenue Trend

Render an in-cell trendline showing performance across Q1 to Q4.

Q1Q2Q3Q4Annual Trend
120180160240—
Applied Formula
=SPARKLINE(A2:D2)
Expected Result:[Sparkline: 4 points]

Evaluates SPARKLINE over the sample table cells, placing the verified output in cell E2.

Formula generator.

Full Generator Wizard

Customize the argument fields below to generate a tailored SPARKLINE formula ready to paste directly into your worksheet.

Generated FormulaReady to copy

Expected result behavior.

Returns "[Sparkline: 4 points]" based on sample evaluation criteria and active cell references.

Sample Output:[Sparkline: 4 points]
Output Type:Text String

Best Practices

  • Set {"charttype", "bar"; "max", 100} to render progress completion meters in dashboard tables.

Common Mistakes

  • Google Sheets specific formula. In Excel, sparklines are inserted via the Insert ribbon rather than cell formulas.
Compatibility Database

Platform & version compatibility.

Verified platform compatibility matrix based on actual spreadsheet calculation engine specifications.

Excel✕
No
Excel 365✕
No
Excel 2021✕
No
Excel 2019✕
No
Google Sheets✓
Supported
Microsoft Excel History & Version Availability

Not available as a worksheet formula function in Microsoft Excel. Entering =SPARKLINE() in Excel returns a #NAME? error.

Google Sheets Compatibility Notes

Native Google Sheets function that draws miniature in-cell charts (line, bar, column, winloss) directly from a formula.

Frequently asked questions.

Technical Q&A
Can I use SPARKLINE across different worksheets in Excel?↓

Yes. You can reference cells located on other sheets by including the sheet name followed by an exclamation mark, for example: =SPARKLINE(Sheet2!A2:A10). If the sheet name contains spaces, enclose it in single quotes: ='Q1 Report'!A2:A10.

What is the most common reason for errors in SPARKLINE?↓

Google Sheets specific formula. In Excel, sparklines are inserted via the Insert ribbon rather than cell formulas.

Does SPARKLINE work in Microsoft Excel?↓

No. SPARKLINE is a proprietary Google Sheets function and is not supported in Microsoft Excel. Recommended Excel alternative: In Microsoft Excel, sparklines are embedded graphical objects created via the Ribbon (Insert > Sparklines > Line/Column), not through a formula.