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-27T18:03:52+00:00

    It worked perfectly!! Thank you SO MUCH!

    0 comments No comments
  2. Anonymous
    2023-12-27T18:09:39+00:00

    You are welcome:)

    0 comments No comments