Share via

After adding a formula to the table, the chart bars disappeared.

Agnieszka Królikiewicz 0 Reputation points
2026-04-03T14:56:13.04+00:00

Hello,

Is there something I could change in this formula to prevent bars disapearing from tthe table?

I have a bar chart with estimated completion and real duration bars. Bars for real duration are based on scatter chart and modified to look like bars. When there is no formula everything looks good.

=IF(COUNT(P.O.!H:H)=0; ""; MIN(P.O.!H:H))

Thank you for help

Microsoft 365 and Office | Excel | For education | Windows

3 answers

Sort by: Most helpful
  1. Ryan-N 12,910 Reputation points Microsoft External Staff Moderator
    2026-04-03T16:41:05.8433333+00:00

    Hi A@gnieszka Królikiewicz,

    Welcome to the Microsoft Q&A forum.If you want to make bulk changes to formulas, I recommend doing the following:

    • First, select the entire column that contains the same formulas.
    • Next, press Ctrl + F, find the value "", and replace it with 0.

    This will help ensure that other formulas in the sheet are not affected.

    If the same column contains different formulas, I recommend that you:

    • Hold down Ctrl, then select each cell or range where you want to change the formula, so that other formulas in the same column are not impacted.

     I hope this information is helpful.

    If you have any questions or need further assistance, please feel free to share them in the comments on this post so I can continue to support you.

    I look forward to continuing the conversation.


    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. 

    Was this answer helpful?

    0 comments No comments

  2. Agnieszka Królikiewicz 0 Reputation points
    2026-04-03T15:21:08.5633333+00:00

    is there a quick way to replace all "" with 0 in formulas of thr table?

    Was this answer helpful?


  3. Q&A Assist
    2026-04-03T14:56:24.4733333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The formula itself does not control whether chart bars appear; the bars disappear because the formula sometimes returns an empty string ("") instead of a numeric value. When a cell used by a chart contains text (including ""), Excel treats it as non-numeric and the corresponding data point is not plotted.

    To keep the bars visible, the formula must always return a numeric value for points that should appear in the chart. For example, instead of returning an empty string when there is no data, return 0 or another numeric placeholder that fits the scenario.

    Example change:

    =IF(COUNT(P.O.!H:H)=0; 0; MIN(P.O.!H:H))
    

    This way, the chart always receives a number (0 or the minimum value), so the bar remains in the chart. If a 0-value bar is not desired visually, consider using chart formatting (e.g., axis scale, data labels, or error bars) rather than returning text from the formula.

    If custom error ranges are needed to visually indicate missing or uncertain values, use error bars on the chart series and configure them via Chart Design → Add Chart Element → Error Bars and, if necessary, More Error Bars Options to set custom values.


    References:

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.