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

前端 未结 19 1617
挽巷
挽巷 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 05:21

    I was having the same issue by using an IF statement to return an unwanted value to "", and the chart would do as you described.

    However, when I used #N/A instead of "" (important, note that it's without the quotation marks as in #N/A and not "#N/A"), the chart ignored the invalid data. I even tried putting in an invalid FALSE statement and it worked the same, the only difference was #NAME? returned as the error in the cell instead of #N/A. I will use a made up IF statement to show you what I mean:

    =IF(A1>A2,A3,"")  
    ---> Returned "" into cell when statement is FALSE and plotted on chart 
         (this is unwanted as you described)
    
    =IF(A1>A2,A3,"#N/A")  
    ---> Returned #N/A as text when statement is FALSE and plotted on chart 
         (this is also unwanted as you described)
    
    =IF(A1>A2,A3,#N/A)  
    ---> Returned #N/A as Error when statement is FALSE and does not plot on chart (Ideal)
    
    =IF(A1>A2,A3,a)  
    ---> Returned #NAME? as Error when statement is FALSE and does not plot on chart 
        (Ideal, and this is because any letter without quotations is not a valid statement)
    
    0 讨论(0)
提交回复
热议问题