跳到主要内容

在Excel中输入新数据后如何自动更新图表?

假设您已经创建了一个图表来根据工作簿中的一系列数据跟踪每日销售额。 但是您需要每天更改或编辑数据数量,在这种情况下,您必须手动更新图表,以使其包含新数据。 在将新数据添加到Excel中的现有图表范围时,是否有任何快速技巧可以帮助您自动更新图表?

输入新数据并创建表格后自动更新图表

使用动态公式输入新数据后自动更新图表


箭头蓝色右气泡 输入新数据并创建表格后自动更新图表

如果您具有以下范围的数据和柱状图,现在您希望在输入新信息时自动更新图表。 在Excel 2007、2010或2013中,您可以创建一个表来扩展数据范围,并且图表将自动更新。 请这样做:

文档更新图表1

1。 选择数据范围,然后单击插页 标签,请参见屏幕截图:

文档更新图表2

2。 在 创建表 对话框,如果您的数据有标题,请检查 我的桌子有标题 选项,然后单击 OK。 看截图:

文档更新图表3

3。 并将数据范围格式化为表格,请参见屏幕截图:

文档更新图表4

4。 现在,当您添加XNUMX月的值时,图表将自动更新。 看截图:

文档更新图表5

笔记:

1.您输入的新数据必须与上述数据相邻,这意味着新数据与现有数据之间没有空白行或列。

2.在表中,您可以在现有值之间插入数据。


箭头蓝色右气泡 使用动态公式输入新数据后自动更新图表

但是有时,您不想将范围更改为表格,并且上述方法在Excel 2003或更早版本中不可用。 在这里,我可以向您介绍一个复杂的动态公式方法。 以以下数据和图表为例:

文档更新图表6

1。 首先,您需要为每列创建一个定义的名称和一个动态公式。 请点击 公式 > 定义名称.

2。 在 新名字 对话框中,输入 日期名字 框,然后从中选择当前工作表名称 范围 下拉列表,然后输入 =偏移($ A $ 2,0,0,COUNTA($ A:$ A)-1) 配方成 框,请参见屏幕截图:

文档更新图表7

3。 点击 OK,然后重复上述两个步骤,您可以使用以下范围名称和公式为每个系列创建一个动态范围:

  • B列:红宝石:= OFFSET($ B $ 2,0,0,COUNTA($ B:$ B)-1);
  • C列:James:= OFFSET($ C $ 2,0,0,COUNTA($ C:$ C)-1);
  • D列:Freda:= OFFSET($ D $ 2,0,0,COUNTA($ D:$ D)-1)

备注:在以上公式中, OFFSET 函数指向第一个数据点, COUNTA 指整个数据列。

4。 为每个列数据定义名称和公式后,右键单击图表中的任何列,然后选择 选择数据,请参见屏幕截图:

文档更新图表8

5。 在 选择数据源 对话框,来自 图例条目(系列) 部分,点击 红宝石 然后单击 编辑 按钮,在弹出 编辑系列 对话框中,输入 = Sheet3!Ruby系列值 部分,请参见屏幕截图:

文档更新图表9
-1
文档更新图表10

6. 然后点击 OK 回到了 选择数据源 对话框中,重复步骤5以更新其余系列以反映其动态范围:

  • James:系列值:= Sheet3!James;
  • Freda:系列值:= Sheet3!Freda

7。 设置完左侧数据后,现在您需要单击 编辑 按钮下 水平(类别)轴标签 要设置此选项,请参见屏幕截图:

文档更新图表11
-1
文档更新图表12

8。 然后点击 OK > OK 关闭 选择数据源 对话框,完成这些步骤之后,您会发现在向工作表中添加新数据时,图表会自动更新。

文档更新图表13

笔记:

  • 1.您必须以连续的方式输入新数据,如果跳过行,则此方法将无法正常工作。
  • 2.如果输入新的列数据,此方法将无效。

小费。如果您想快速将工作表中的范围内容导出到图形,请尝试使用 Kutools for Excel 将范围导出为图形 如以下屏幕截图所示。 它的完整功能不受限制,在[模块745}天之内, 请下载并立即免费试用。

将工作簿中的图形(图片/图表/形状/所有类型)以Gif / Tif / PNG / JPEG格式导出到文件夹

如果工作簿中有多种类型的图形,并且您只想将工作表中的所有图表导出到一个文件夹作为其他类型图片的 gif,您可以使用 Kutools for Excel 的导出图形实用程序,只需 3 个步骤即可处理此问题工作 。 点击获取全功能 30 天免费试用!
doc导出图形
 
Kutools for Excel:拥有300多个便捷的Excel加载项,可以在30天内免费试用。

相关文章:

如何在Excel中向图表添加水平平均线?

如何在Excel中创建组合图并为其添加辅助轴?

最佳办公生产力工具

🤖 Kutools 人工智能助手:基于以下内容彻底改变数据分析: 智能执行   |  生成代码  |  创建自定义公式  |  分析数据并生成图表  |  调用 Kutools 函数...
热门特色: 查找、突出显示或识别重复项   |  删除空白行   |  合并列或单元格而不丢失数据   |   不使用公式进行四舍五入 ...
超级查询: 多条件VLookup    多值VLookup  |   跨多个工作表的 VLookup   |   模糊查询 ....
高级下拉列表: 快速创建下拉列表   |  依赖下拉列表   |  多选下拉列表 ....
列管理器: 添加特定数量的列  |  移动列  |  切换隐藏列的可见性状态  |  比较范围和列 ...
特色功能: 网格焦点   |  设计图   |   大方程式酒吧    工作簿和工作表管理器   |  资源库 (自动文本)   |  日期选择器   |  合并工作表   |  加密/解密单元格    按列表发送电子邮件   |  超级筛选   |   特殊过滤器 (过滤粗体/斜体/删除线...)...
前 15 个工具集12 文本 工具 (添加文本, 删除字符,...)   |   50+ 图表 类型 (甘特图,...)   |   40+ 实用 公式 (根据生日计算年龄,...)   |   19 插入 工具 (插入二维码, 从路径插入图片,...)   |   12 转化 工具 (小写金额转大写, 货币兑换,...)   |   7 合并与拆分 工具 (高级组合行, 分裂细胞,...)   |   ... 和更多

使用 Kutools for Excel 增强您的 Excel 技能,体验前所未有的效率。 Kutools for Excel 提供了 300 多种高级功能来提高生产力并节省时间。  单击此处获取您最需要的功能...

产品描述


Office Tab 为 Office 带来选项卡式界面,让您的工作更加轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,发布者,Access,Visio和Project。
  • 在同一窗口的新选项卡中而不是在新窗口中打开并创建多个文档。
  • 每天将您的工作效率提高50%,并减少数百次鼠标单击!
Comments (21)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Good afternoon, I have a table for calculating points, on another sheet. is needed on another sheet so that there is an automatic sorting of commands by place
This comment was minimized by the moderator on the site
What if the months were in the columns and you had data series in the rows, how would you do the formula then?
This comment was minimized by the moderator on the site
Doesnt work or not applicable. My chart already refers to the correct data automatically... data is directed to table columns. The problem is the GRAPH wont update.
This comment was minimized by the moderator on the site
HI,
This trick doesnt work if you want to add new columns. This trick is for fixed columns. What if there is a data yearwise in columns and every year a new year column is added so how will it get added to the chart ??

Any idea you can suggest ??

Cheers,

Mufaddal
This comment was minimized by the moderator on the site
when I type in cell any no. like - 210 it reflect as = 2.10 , no formula is taking place why? any no. shows devide by 100 as I mentioned , decimal comes automatically how to resolve this ?
This comment was minimized by the moderator on the site
It works well! Thank you! One question: what if my drop down list is not on the same sheet with the "table" where i have datas? how can I modify the function?
This comment was minimized by the moderator on the site
Thanks for the message. But I do not get your question clearly, why don't you upload a screenshot of your problem for me to understand easily? More description, easier to understand. Thank u.
This comment was minimized by the moderator on the site
did you manage to solve this issue? having same issue at the moment
This comment was minimized by the moderator on the site
Airtel mobile Bill Payment
This comment was minimized by the moderator on the site
A chart's ranges can depend on names or not. If a chart range depends on, say A1:E5, and you insert a row at row 3, and a column at column C, the chart will automatically depend on A1:F6. Similarly, if you have a name defined as A1:E5, whether you use it as a chart's range or not, and you insert a column and row at C3, the name's definition will expand to A1:F6. But in either case, if you insert a column and A or E (the endpoints), or a row at 1 or 5, the behavior isn't so well defined: maybe the chart range or name's definition will expand; maybe it won't. To answer Melissa, you'd have to insert rows or columns before or to the left of the chart range. I think it's better to use names, because names can be defined using formulas that involve OFFSET, COUNT, INDEX, MATCH, whatever else. So the better answer to Melissa is to define a name for one cell, namely the last of the eight columns or rows, then define the name in term of an OFFSET from that cell: OFFSET(cell,-8,-8,8,8) to go back and up eight cells and use an 8x8 range.
This comment was minimized by the moderator on the site
Great reminder as I don't do these kind of chart functions that often. As an improvement you could mention how to edit defined names in the name manager but I'm not sure if the editing actually enables the function of the adding rows to work completely
This comment was minimized by the moderator on the site
You can define chart ranges with names or not -- in either case if you physically insert rows or columns in the middle of a range, it automatically expands. I think it's best to use names for charts and lots of other things, because you can define names as formulas, not just straight ranges. You must use OFFSET (which resizes too), because that returns a range, but its parameters, which are numbers, can be specified with formulas that use INDEX, MATCH, COUNT, SUM, VLOOKUP, any crazy formula you want. Melissa, that's the best way to handle your situation: give a name to one bookmark cell, then define another name to be offset from that -8 rows or columns, and resize it 8 rows or columns.
This comment was minimized by the moderator on the site
Hi there, thank you so much for this tutorial. I am just wondering, how to apply this method to the data that updated in the column not in the row? is there any additional changes that I need to do besides offset formula? thank you.
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations