- 注册
- 2009-09-17
- 消息
- 3,551
- 荣誉分数
- 134
- 声望点数
- 0
那个Pivot Table 是学过但是没有用过,全忘了,记忆里好像很复杂。
没有什么直接的公式吗?
一定要用EXCEL, 如果用ACCESS,问题很简单了
Access就从来没有用过:blowzy:。。。只能用Excel.
每个种类作一个列,用 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.