【 tulaoshi.com - 办公软件 】
在报表的统计过程中,提取上月数据是非常的需求,本文用一个销售月报的例子来说明如何自动提取上月数据。
一、问题
有一个销售公司,需要用Excel服务器管理销售月报:
销售月报
年 月 填报日期
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652220422816059.jpg)
上月金额需要从上月的销售月报中提取。其余字段自己填写。 二、用Excel服务器2004实现 1.建立模版 (1)登录Excel服务器
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652220422814928.jpg)
(2)点击菜单“模版”,选择“新建模版”
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652220422811798.jpg)
(3)点击“确定”
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652220422812739.jpg)
注意:报表编号、报表名称不要重复。 (4)点击“确定”,Excel打开一个新工作表,在上面画出“销售月报”的格式:
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652220422855168.jpg)
画好后,保存。 (5)定义单一数据项
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652220422843606.jpg)
注意:引用上月数据时,需要三个字段:年、月、填报日期,特别时填报日期应当在年、月之中。 (6)定义重复数据项
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652220422876073.jpg)
(7)定义表间公式
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652220422844251.jpg)
将报表自身的数据项选择到数据源中:
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652220422942521.jpg)
点击确定:
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652220422931948.jpg)
点击“筛选条件”:
![](http://img.jcwcn.com/attachment/portal/2006-5/22/065222042292981.jpg)
注意:条件中的“销售月报2_主表。填报日期 介于 上月(本报表。Sheet1:年,本报表。Sheet1:月)”意思指从上月报表中提取。 “销售月报2_明细。产品 = 本报表。Sheet1:产品”意思是提取报表上产品的上月金额。 点击“确定”,回到表间公式界面,再点击“充填方式”:
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652220422961398.jpg)
因为产品需要和表上的产品一一对应,因此,操作选择“按行(列)匹配”。 上月金额的“操作”选择“填入值”方式。 完整的表间公式:
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652220422954402.jpg)
2.填报: (1)点击“报表”,选择“填报”:
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652220422950463.jpg)
(2)点击“销售月报2”
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652220422980389.jpg)
填写完,点击“保存”:
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652220422929632.jpg)
点击“是”:
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652220422924189.jpg)
应用表间公式提取:
![](http://img.jcwcn.com/attachment/portal/2006-5/22/0652220422997649.jpg)
保存,完成了2月份的月报。 三、结束语 本文仅介绍了Excel服务器中应用表间公式来提取上月数据,事实上,提取上日、上季、上年都非常方便。