![](/img/trans.png)
[英]EXCEL: How to automatically create groups based on sum being less than X and not greater than Y
[英]Custom graph in excel, x value is always 100% and y is a less than or greater than, showing that percent
我做了一個大宏,可以生成動態數據圖。 但是,我的一張圖表將顯示實際小時數與估算時間。 我使用的是堆疊的100%,但問題只有在est <實際時才能實現。 我想將實際值設置為100%,然后將第二個數據系列估計為小於或等於100%表示80%或120%等。
非常感謝 :)!
ActiveSheet.ChartObjects(“ Monthly”)。Delete
For Each ws In Worksheets
If ws.Name <> "Summary" And ws.Name <> "Calenders" And ws.Name <> "Front Page" And ws.Name <> "Arc" Then
ws.Range("F129").Copy
ActiveSheet.Range("BH65536").End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
End If
Next ws
For Each ws In Worksheets
If ws.Name <> "Summary" And ws.Name <> "Calenders" And ws.Name <> "Front Page" And ws.Name <> "Arc" Then
ws.Range("G128").Copy
ActiveSheet.Range("BI65536").End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
End If
Next ws
Range("BJ2").Select
ActiveCell.FormulaR1C1 = "=RC[-1]-RC[-2]"
Range("BJ2").Select
Selection.AutoFill Destination:=Range("BJ2:BJ75"), Type:=xlFillDefault
Range("BJ2:BJ75").Select
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlColumnStacked100
ActiveChart.Parent.Name = "Monthly"
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(1).Values = "=Summary!$BH$2:$BH$53"
ActiveChart.SeriesCollection(1).Name = "=""Estimated"""
也許堆積條形圖不是解決此問題的最佳圖表類型。
為什么不使用簡單的柱形圖繪制偏差(+/-),如下所示:
我的研究書呆子建議僅對有序數據類型使用堆疊的條形/列:),例如“ <1周”,“ 1-2周”,“ 3+周”等類別。
或者使用簡單的堆疊條形圖/列(即,不是堆疊的100%),它應該允許您顯示120%之類的值。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.