Add an in-cell bar graph

Anonymous
2023-12-25T15:49:24+00:00

I have a table where each query has a 'level' of a set amount of criterias, and I want to have a bar graph for each line that will allow me to see the dominant criterias clearly.

I know how to make a graph like that but I specifically want the graph to fit into the matching cells in the table.

Alternativly (not ideal but I'm willing to compromise), is it possible to make a column sparkline have a set color for each column (and not just the first and last ones)?

An illustration of what I want it to look like (A-D is the queries, a-d is the criterias):

Thank you in advance :)

Microsoft 365 and Office | Excel | For education | Windows

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
{count} votes
Answer accepted by question author
  1. Anonymous
    2023-12-27T08:06:00+00:00

    This formula will get a list from 1 to 100 . You can also input numbers directly in cells.

    =SEQUENCE(,100)

    Image

    1. Then apply conditional formatting on rows.
    2. Less than B2
    3. Greater than B2 and Less than B2+C2

    ...

    =F$1<=$B2

    =AND(F$1>$B2,F$1<=$B2+$C2)

    =AND(F$1>$B2+$C2,F$1<=$B2+$C2+$D2)

    =AND(F$1>$B2+$C2+$D2)

    Image

    1 person found this answer helpful.
    0 comments No comments
Answer accepted by question author
  1. Anonymous
    2023-12-25T16:10:12+00:00

    It seems there is no built-in function to create a such chart in cell.

    You may try conditional formatting as workaround.

    Formula in F1, then set the 100 column with width 0.2

    =SEQUENCE(,100)

    Image

    Conditional formatting formula:

    =F$1<=$B2

    =AND(F$1>$B2,F$1<=$B2+$C2)

    =AND(F$1>$B2+$C2,F$1<=$B2+$C2+$D2)

    =AND(F$1>$B2+$C2+$D2)

    Image

    Another way is use sparklines. However, there is no stacked Bar in Sparklines.

    Image

    Third way is to create 4 stacked bar charts and remove all the unnecessary parts.

    1 person found this answer helpful.
    0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Anonymous
    2023-12-26T17:52:00+00:00

    > ... that will allow me to see the dominant criteria clearly.

    Did you go the Sparkline route?

    Image

    0 comments No comments
  2. Anonymous
    2023-12-27T06:18:34+00:00

    Unfortunaly this won't do. I'd need each column to be a specific color (consistenly) for it to be what i need. The sparkline will just show me there is a dominant criteria, but itll be unclear which one it is (my actual table has way more than 4 criterias and queries)

    0 comments No comments
  3. Anonymous
    2023-12-27T07:55:21+00:00

    Could you please give some extra steps for the formatting solution? The SEQUENCE command gave me an error...

    Also could you explain the formula? I need to fit it to my actual table so I want to understand how it works

    Thank you so much!!

    0 comments No comments