How to Add In-Cell Sparklines to Compare Trends in Google Sheets

Draw a trend line inside each row of a report and give the lines a common scale so readers can compare them fairly.
Follow these steps at your own pace. Check product terms and prices directly with providers before purchasing.
Quick answer
Enter SPARKLINE with a row of numeric observations to draw a miniature line inside one cell. For comparisons between rows, give all the sparklines the same vertical limits and the same sequence of time periods.
Draw one line per location
- Put location names in A and week labels in B1:E1, oldest to newest. Enter 10, 15, 12, and 20 for North in row 2. Enter 40, 45, 42, and 50 for South in row 3.
- In F2 enter
=SPARKLINE(B2:E2)and copy it to F3. Widen F and increase the row height if necessary. Read each line from left to right. - To compare levels on a common scale, enter ymin in H1 and 0 in I1, then ymax in H2 and 60 in I2. Replace F2 with
=SPARKLINE(B2:E2,$H$1:$I$2)and copy it to F3. - Check the example. Both lines rise, dip, and rise again. With the shared 0–60 scale, South should sit higher. If future observations exceed 60, raise the upper limit for both lines.
When the line tells the wrong story
Automatic scaling can make a small swing look as dramatic as a large one. Also check that every row represents the same weeks. Keep missing measurements separate from real zeroes, and label the period covered above the values. A sparkline has little room to show units or context on its own.
The formula lives in F. Updating the data in B:E redraws the line. If another week is added outside the range, move the chart column as needed and extend the reference. Keep the latest number beside the chart, or calculate percentage change for readers who need the size of a move. If imported figures fail to plot, check for numeric values stored as text.
Comments
Comments are reviewed before they become public.
Sign in with Google to leave a comment.
Sign in with GoogleNo approved comments yet. Be the first to start the discussion.