Creating a chart in Excel that ignores #N/A or blank cells

前端 未结 19 1784
挽巷
挽巷 2020-12-03 04:25

I am attempting to create a chart with a dynamic data series. Each series in the chart comes from an absolute range, but only a certain amount of that range may have data, a

19条回答
  •  温柔的废话
    2020-12-03 04:57

    One solution is that the chart/graph doesn't show the hidden rows.

    You can test this features doing: 1)right click on row number 2)click on hide.

    For doing it automatically, this is the simple code:

    For Each r In worksheet.Range("A1:A200")
       If r.Value = "" Then 
          r.EntireRow.Hidden = True 
       Else: 
          r.EntireRow.Hidden = False
    Next
    

提交回复
热议问题