官方微信 手机客户端

澳洲ABC

搜索
楼主: 平平淡淡.

[培训] Excel(Power BI)热线

[复制链接]

7

主题

134

帖子

353

积分

初入江湖

Rank: 3Rank: 3

积分
353
发表于 2014-10-31 12:50:32 | 显示全部楼层

本帖最后由 平平淡淡 于 2014-9-20 21:52 编辑

william.wangzy 发表于 2014-9-20 11:15

好帖子,顶!
我也发了个Pivot Table顺序排列的问题到你的邮箱,先谢谢了。 ...

method 1 custom sort
Create a Custom List in Excel >Excel options>Edit Custom Lists
Right clcik on field in PT>Sort>More Sort options>Manual>More options>untick Sort automatically>Fisrt Key Sort order>choose your Custom List
This should work. I have used this a lot. for some reason I can not get it work in your case. Have no idea why.
method 2 PowerPivot
You need to install PowerPivot if you do not have it. Add the sort order to your main table( you can use vlookup to grab the sort order from your Order sheets. then load the table into PowerPivot (Clicking Create Linked Table in Power Pivot Tab in Excel ribbon will link your table into Power Pivot)

2014-9-20 22:44:14 上传
下载附件 (82.32 KB)

1. Create Linked Table to bring your table into Power Pivot

2014-9-20 22:44:16 上传
下载附件 (105.35 KB)

2.Click Power Pivot icon to go to Power Pivot Window

2014-9-20 22:48:09 上传
下载附件 (146.65 KB)

2 Click sort by
then select the code column in PowerPivot window and click Sort by Column, select the order column.
. Within PowerPivot window click PivotTable to create a Pivot Table, when you drag code column to Row you will see it's automatically sorted by desired order.

2014-9-20 22:46:22 上传
下载附件 (108.24 KB)

4. Pivot table with Desired sort
Sample workbook can be found below
https://onedrive.live.com/?cid=7 ... 5E31C189063EC%21124
回复 支持 反对

使用道具 举报

1

主题

115

帖子

291

积分

初入江湖

Rank: 3Rank: 3

积分
291
发表于 2014-10-31 13:41:23 | 显示全部楼层

楼主太强大了,我manager也是excel很厉害,看的我一愣一愣的
回复 支持 反对

使用道具 举报

6

主题

201

帖子

472

积分

初入江湖

Rank: 3Rank: 3

积分
472
发表于 2014-10-31 15:06:02 | 显示全部楼层

本帖最后由 maodoubao 于 2014-9-21 02:39 编辑
分儿发完了才看到lz这么热心的帖子。分儿回来一定补上。
请教一个问题。如何合并一堆结构一样的excel文件?(excel2007)
例如:
每个文件workbook都有一个sheet纪录如下数据:
第一行是:房间名称,面积,周长,高度。
从第二行起每行就是按第一行指定的房间数据。
如何把几个上述的workbook合成一个文件?
第一行还一样,第二行起就把所有workbook里的记录合在一起。
回复 支持 反对

使用道具 举报

3

主题

28

帖子

85

积分

新手上路

Rank: 1

积分
85
发表于 2014-10-31 16:34:49 | 显示全部楼层

我提个问题 关于保护工作表的问题。比如,一个excel有10个sheet,每个都不同,每个sheet上都有公式,并且设置成locked,我能否同时保护10个sheet上的所有公式而不用一页一页去设置密码? 试过保护整个文件,但是就算是locked的cell公式还是可以被删除
提前谢过
回复 支持 反对

使用道具 举报

3

主题

58

帖子

143

积分

正式会员

Rank: 2

积分
143
发表于 2014-10-31 16:59:02 | 显示全部楼层


maodoubao 发表于 2014-9-21 02:38

分儿发完了才看到lz这么热心的帖子。分儿回来一定补上。
请教一个问题。如何合并一堆结构一样的excel文件 ...

这个问题我可以回答 LZ 可以指点一下如果有更好的方法
DATA- Consolidate-选择你需要合并的内容 (SHEET1, SHEET2 etc),第一行就不需要选了。
不知道我是否理解正确你的要求。

2014-9-21 18:44:06 上传
下载附件 (53.65 KB)

回复 支持 反对

使用道具 举报

3

主题

58

帖子

143

积分

正式会员

Rank: 2

积分
143
发表于 2014-10-31 17:19:31 | 显示全部楼层


maodoubao 发表于 2014-9-21 02:38

分儿发完了才看到lz这么热心的帖子。分儿回来一定补上。
请教一个问题。如何合并一堆结构一样的excel文件 ...

楼上的提到了一种方法,见下图,但是我从来没有用过它,参考以下链接获取更多信息。
http://office.microsoft.com/en-a ... et-HP010342300.aspx

2014-9-21 20:35:59 上传
下载附件 (47.12 KB)

碰到这样的问题,我会选择VBA。你可以参考以下连接。你的情况不一样的地方是,每个结构一样的sheet在不同的workbook里,只要多加一个循环就可以了。稍微修改一下下面的code,你的问题就很容易解决了。
http://www.vbaexpress.com/kb/getarticle.php?kb_id=151
回复 支持 反对

使用道具 举报

0

主题

18

帖子

70

积分

新手上路

Rank: 1

积分
70
发表于 2014-10-31 17:37:05 | 显示全部楼层


糯米老虎 发表于 2014-9-21 10:37

我提个问题 关于保护工作表的问题。比如,一个excel有10个sheet,每个都不同,每个sheet上都有公式,并且设 ...

This one is a bit tricky. By default, every cell in a worksheet is locked. If all of your 10 sheets have exactly the same structure, you  can select the first one and hold SHIFT to select last sheet to put 10 worksheets in group mode. then you select all cells to unlock them first and then select the cells with formula and lock them.Lastly protect your worksheet and uncheck "Select locked cells", add password, then you are good to go.
But if the 10 worksheets do not have the same structure and the cells with formula are not in the same range in each sheet, things will get complex here. You can use VBA to do this of course, but it will be cumbersome if you have multiple ranges in each sheet which you want to protect the formula.  I would prefer to have a look at your workbook before i can give you a solid solution.
回复 支持 反对

使用道具 举报

3

主题

58

帖子

143

积分

正式会员

Rank: 2

积分
143
发表于 2014-10-31 19:01:45 | 显示全部楼层


平平淡淡 发表于 2014-9-20 21:13

method 1 custom sort
Create a Custom List in Excel >Excel options>Edit Custom Lists

楼主太强了,在源数据里面加一栏看来也是不错的解决办法。还没有用过PowerPivot,我要安装下,再尝试下method 2,谢谢!
回复 支持 反对

使用道具 举报

7

主题

1万

帖子

1万

积分

江湖老手

Rank: 6Rank: 6

积分
11258
发表于 2015-11-9 02:21:00 | 显示全部楼层
好吧,
回复 支持 反对

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

联系客服 关注微信 下载APP 返回顶部 返回列表