Share via

Is there an equivalent to the Google SPARKLINE function in Excel?

Anonymous
2025-03-04T15:20:48+00:00

I have a formula that returns a list of integer values that I'd like to represent in a sparkline. In Google Sheets, I was able to wrap the formula in a SPARKLINE call to get a mini-chart in a single cell. Excel seems to not have this function or no longer has the function in Excel for Mac (current 365 version). I know that there is a sparkline that you can use from the Insert menu, but it requires a range of cells and doesn't seem to allow a formula.

I've tried use TEXTJOIN to put the list of values as comma delimited in a single cell and use the Insert / Sparkline, but it doesn't seem to like a single cell as input either.

Microsoft 365 and Office | Excel | For business | MacOS

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Andreas Killer 144.1K Reputation points Volunteer Moderator
2025-03-04T18:19:52+00:00

Okay, that did not work, for many reasons.

You have to use separate cells for each State value, then you can add a sparkline.

B6: =TRANSPOSE(VLOOKUP(FILTER(Status,ProjectNames=A6),J2:K4,2,0))

If your want the highest (lowest) state only, replace TRANSPOSE with MAX (MIN for the lowest State).

Andreas.

Was this answer helpful?

0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Anonymous
    2025-03-04T22:50:59+00:00

    Thank you, I believe that answers my question. There appears to be no function to feed data in Excel and come up with a sparkline. In the Google sheet, I simply used:

    =SPARKLINE(IF(........))

    It took the results from my formula and rendered the sparkline in a single cell. It appears that Excel doesn't have an equivalent to do this.

    I appreciate the help!

    • John

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2025-03-04T16:31:05+00:00

    Thank you, Andreas!

    Adding the "--" resulted in a #VALUE! error.

    The use case is a dashboard that shows project status for a portfolio of projects. The intent was to show a trend line from week to week whether the status is improving, declining, or staying the same. Here is the formula I'm using:

    --TEXTJOIN(",",TRUE,IF(FILTER(Status,ProjectNames=$A6)="Green",1,IF(FILTER(Status,ProjectNames=$A6)="Yellow",0,IF(FILTER(Status,ProjectNames=$A6)="Red",-1))))

    When I remove the "--", the result in the cell is "0,1" based on the criteria I'm using. Without the TEXTJOIN, I get a list of 0 and 1 in subsequent rows.

    Thank you again for responding and any additional insight that you can provide.

    Was this answer helpful?

    0 comments No comments
  3. Andreas Killer 144.1K Reputation points Volunteer Moderator
    2025-03-04T16:08:35+00:00

    Sparklines works with values only, not with text. If you see a value in the cell does not mean that there is really a value. If you use a formula to generate the content, add a -- to the front of your formula.

    E.g. instead of

    =TEXTJOIN( etc.

    Try

    =--TEXTJOIN( etc.

    Andreas.

    Was this answer helpful?

    0 comments No comments
  4. Jim G 134K Reputation points MVP Volunteer Moderator
    2025-03-04T16:06:47+00:00

    Was this answer helpful?

    0 comments No comments