• Welcome to ComeFromChina Community (CFC中文网)! We are the largest Chinese Canadian community forum in Ottawa. Please to participate in discussions, post topics, view images, and access full community features. Join us today! 欢迎来到CFC中文网。请登录以参与讨论、发布主题并查看图片。

知道Excel的请帮忙。。。折磨S人啦。。。

The Devil Wears Prada

If you get hungry,bite me
VIP
注册
2009-09-17
消息
3,551
荣誉分数
134
声望点数
173
需要做一个统计,折腾了一下午也没有想出公式。。。
最后急于交差拿笔点着屏幕查了400行啊。。。:crying::crying::crying:。。。比被人蹬了还难受。。。:crying::crying::crying:

这个是月报表。。。不想每个月都S一次啊。。。谢谢啦 :blowzy::D:D:D
 

附件

  • excel.JPG
    excel.JPG
    11.3 KB · 查看: 429
用PIVOT TABLE, 把有关的变量自动加总。
 
那个Pivot Table 是学过但是没有用过,全忘了,记忆里好像很复杂。
没有什么直接的公式吗?
 
一定要用EXCEL, 如果用ACCESS,问题很简单了
 
再加个FIELD,VALUE都是1,然后 SUM 加条件吧, 条件就是所有FIELD X的值=A OR B?:D:D:D

你这不是看我快S啦再伸手掐俺脖子一下啊!本来就堵得慌上不来气!这下更糊涂啦!:flaming::flaming::flaming:

直接给公式吧,比如什么:
=countif(...,if...,if....)
 
每个种类作一个列,用 IF(logical_test,value_if_true,value_if_false) ,然后把每个种类的列中的数加起来就行了。

例如:
D1填: =IF(AND(A1="APPLE",B1="A"),C1,"")
下面的用鼠标拉下去自动生成。
 
create a table called table_A with two fields: fruit_name and fruit_type and then import the data to the table.

then create several SQLs such as:


select count(*) from tableA where fruit_name='apple' and fruit_type='A';

select count(*) from tableA where fruit_name='pear' and fruit_type='B';

select count(*) from tableA where fruit_name='pear' and fruit_type='A';

....


you can run it every month to get the results.


Access就从来没有用过:blowzy:。。。只能用Excel.
 
每个种类作一个列,用 IF(logical_test,value_if_true,value_if_false) ,然后把每个种类的列中的数加起来就行了。

例如:
D1填: =IF(AND(A1="APPLE",B1="A"),C1,"")
下面的用鼠标拉下去自动生成。

刚试了,结果如下:
 

附件

  • excel.JPG
    excel.JPG
    18.3 KB · 查看: 394
create a table called table_A with two fields: fruit_name and fruit_type and then import the data to the table.

then create several SQLs such as:


select count(*) from tableA where fruit_name='apple' and fruit_type='A';

select count(*) from tableA where fruit_name='pear' and fruit_type='B';

select count(*) from tableA where fruit_name='pear' and fruit_type='A';

....


you can run it every month to get the results.

OMG!:blowzy:
SQL是什么东东啊?
 
后退
顶部
首页 论坛
消息
我的