Tag: 图表

在Excel中进行条件格式化,在图表中查找variables

嗨,我需要一些帮助与条件格式在Excel中。 我想要的是:当我将任何特定个人的身高放在“身高盒子”中时,我希望能够将其与左边的桌子相匹配,并相应地find合适的体重,并将体重放在“最佳体重”的框中。

使用顺序或不同的颜色比例基于数据着色图表的每个点

如何根据电子表格中的值为散点图上的各个点着色? 例如,我如何创build下面的图表: 如果x数据在列U中,则y数据在列V中,并且颜色数据在列T中。我如何创build发散式色彩映射而不是顺序色彩映射?

从模块调用用户窗体来显示popup图并返回到模块中的同一位置

我有一个VBA程序运行查询从Oracle数据库中提取数据,并将其放置在Excel工作表中,并创build一个用于上传到其他软件的输出.txt文件。 我试图在提取数据和创build输出文件之间放置一个中间步骤,允许用户“仔细检查”输出文件的数据是否正确。 我试图创build一个用户窗体,显示一个popup式图表,允许用户“接受”或“拒绝”创build一个输出文件。 下面是我的VBA代码的基本副本,其中macros调用数据被调用,然后创build输出文件。 如何访问用户表单,然后返回到模块中的相同位置以继续该程序? Public Sub OutputSurveyFile() 'Call appropriate macro to run the query to get data needed to be exported to file Call qry_DirSurveyRpt 'Set worksheet to the sheet activated by calling query macro Set wsData = ActiveSheet 'Determine last row and column of data With wsData LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row LastCol = […]

Excel VBA通​​过string名称参考图表系列集合

我有需要引用一个名字的系列集合。 系列collections的MSDN对象模型页面可以使用索引或名称。 但是,当我尝试使用stringvariables时,我得到错误1004“无效的参数”: Dim sSeriesName As String dim aRootCats() as string Dim cSeriesCol As SeriesCollection For x = 0 To UBound(aRootCats) sSeriesName = aRootCats(x) Set cSeriesCol = cChart.ChartGroups(1).SeriesCollection(sSeriesName) Next x 我也尝试了以下内容: sSeriesName = CStr(aRootCats(x)) ' just in case, because I filled this array with variant data type earlier Set cSeriesCol = cChart.ChartGroups(1).SeriesCollection(sSeriesName) 和 Set cSeriesCol […]

如何将数据表与图例键添加到C#中的MS图表?

有2个列表名为listversion & MIN_list 。 使用这些列表的值我创build了一个折线图。 一切都很好。 但我想知道是否有可能添加一个数据表与图例如MS Excel的图例键。 chart.Series.Clear(); chart.ChartAreas[0].AxisX.Title = "Version"; chart.ChartAreas[0].AxisX.TitleFont = new System.Drawing.Font("Arial", 12, FontStyle.Regular); chart.ChartAreas[0].AxisY.Title = "Time"; chart.ChartAreas[0].AxisY.TitleFont = new System.Drawing.Font("Arial", 12, FontStyle.Regular); Series MIN = chart.Series.Add("Minimum"); MIN.Points.DataBindXY(listVersion, MIN_list[j]); MIN.ChartType = SeriesChartType.Line; MIN.Color = Color.Red; MIN.BorderWidth = 3; 我期待着这样的事情 如果可能我该怎么做? 谢谢。

在Excel VBA中编辑和命名新添加的图表

我正在尝试在Excel VBA中编写一个macros,添加一个图表,然后要重新命名并编辑列的颜色,但不知怎的,它会引发一个debugging错误。 这是我的代码。 有人可以帮帮我吗: Sub Charts() ActiveSheet.Shapes.AddCha rt.Select ActiveChart.ChartType = xlColumnStacked100 ActiveChart.SetSourceData Source:=Sheets("Calculations").Range("A1:D11") ActiveChart.Name = "MyChart" ActiveChart.SeriesCollection(1).XValues = "=Data!$N$5:$N$14" ActiveChart.SeriesCollection(3).Select ActiveChart.Legend.Select ActiveChart.Legend.LegendEntries(1).Select With Selection.Format.Fill .Visible = msoTrue .ForeColor.RGB = RGB(255, 0, 0) .Transparency = 0 .Solid End With With Selection.Format.Line .Visible = msoTrue .ForeColor.RGB = RGB(0, 0, 0) .Transparency = 0 End With ActiveChart.Legend.LegendEntries(2).Select With […]

VBA从Excel图表中提取系列名称,X和Y值

我正在寻找从Excel图表中提取数据的帮助。 具体来说,我需要从图表上的所有点拉出系列名称 , X和Y值。 我从Excel的基本代码开始,但它只给我X值。 Sub GetChartValues() Dim NumberOfRows As Integer Dim X As Object Counter = 2 ' Calculate the number of rows of data. NumberOfRows = UBound(ActiveChart.SeriesCollection(1).Values) Worksheets("ChartData").Cells(1, 1) = "X Values" ' Write x-axis values to worksheet. With Worksheets("ChartData") .Range(.Cells(2, 1), _ .Cells(NumberOfRows + 1, 1)) = _ Application.Transpose(ActiveChart.SeriesCollection(1).XValues) End With ' […]

删除图表图片而不删除图表

在试图导出一个范围作为图片在用户窗体上使用我有以下几点: FolderPath = ThisWorkbook.Path & "\dbfiles" If ComboBox3.Value = "Cube" Then With Worksheets("Form") Set r = .Range("AE21:AM52") r.CopyPicture Appearance:=xlPrinter, Format:=xlPicture Set chtO = .ChartObjects("Chart 4") End With With chtO.Chart .Paste .Export Filename:=FolderPath & "\temppic.bmp", FilterName:="BMP" End With 问题是,当代码运行并且图表区域中已经有图片时,“新的粘贴”的大小会有所不同,并且不会填充图表区域。 我需要这个发生,所以图片与我的用户表单上的其他对象排队。 我发现,如果我手动删除图片,但离开图表(点击,按删除),一切工作正常。 所以我的问题是,你如何务实地做到这一点? 我已经尝试过,删除差距是无济于事的。 (object_chart的方法删除失败)提前致谢。

Excel图表:按值sorting(自动)

我有以下问题: 我需要从条形图的最高到最低sorting我的值: 我知道我可以使用数据透视表和透视图,但是将来可能会有些复杂。

来自数据透视表和静态数据的Exceldynamic图表

我有三年的数据。 今年的数据15/16每周更新一次。 前两年的数据是完整的,是静态的(不再更新)。 我可以在不同系列的三年中制作图表,但是我必须每周手动更改范围以更新图表。 我怎样才能制作一个图表,将前两年和当前每周数据映射到一个图表。 从今年的数据来看,从过去两年的数据是静态数据? 谢谢 更新: 在尝试将“= iferror”添加为空白(“”)的build议之后,图表绘制了今年余下的时间,但未来date在图表上显示为0,如何删除该图表,但保留今年余下时间的映射,所以图是dynamic的?