找回密码
 立即注册

QQ登录

只需一步,快速开始

xiwu

中级会员

97

主题

445

帖子

910

积分

中级会员

积分
910

活字格认证

xiwu
中级会员   /  发表于:2010-11-30 20:17  /   查看:7326  /  回复:7
有两个问题:
1、想使用公式FREQUENCY()实现统计数据,在excel中要求以数组的方式输入(ctrl+shift+enter),但在spread中不知道如何用代码实现,版主方便的话帮忙写两句
2、数据格式的问题:在另一贴中写过excel中"DK"##+###格式,可以将数据23300显示为DK23+300,但我从excel中把表导进spread中后发现,显示为DK23300;不知是否可以实现?

7 个回复

倒序浏览
xiwu
中级会员   /  发表于:2010-12-1 08:53:00
沙发
今天又遇到个问题
问题3、 sv.Rows.Add(Index, 1);这里的Index是从0开始计的吗? 如果是的话,哪当index=6时,函数是在第7行之前插入一行吗?插入后,这一行就是第7行,而原来的第7行变为了第8行?
回复 使用道具 举报
gw0506
超级版主   /  发表于:2010-12-1 09:45:00
板凳
1. 安装Spread时,有一个公式手册,叫Formula Reference(CHM)。它是专为方便用户使用公式而制作的。包括详细的例子,解释,用法等等。
我不是很清楚你是想让我写什么?如何以数组方式输入?还是如何使用Frequency公式?
2. 修改CellType中FormatString属性,设置为DK00+000即可。
3. 是从0开始计数。如果index是6,意思是,这一行插入之后的index是6.也就是在第6行之前插入一行。
回复 使用道具 举报
xiwu
中级会员   /  发表于:2010-12-1 15:13:00
地板
Summary This function calculates how often values occur within a range of values. This function returns a vertical array of numbers. Syntax FREQUENCY(dataarray,binarray) Arguments This function has these arguments: Argument Description dataarray Array of values or a reference to a set of values for which to count frequencies binarray Array of intervals or a reference to intervals into which to group the values of dataarray Remarks The number of elements in the returned array is one greater than the number of elements in binarray. The extra element in the returned array is the count of values in dataarray that is above the highest value in binarray. Use the INDEX function to get individual elements from the returned arrays. Data Types Accepts an array. Returns an array. 以上是帮助
例子: FREQUENCY(A1:A7,C2:C5) 该公式返回的是一数组,这个数组怎么填入spread里与C2:C5对应的D2:D5里?
回复 使用道具 举报
gw0506
超级版主   /  发表于:2010-12-1 15:38:00
5#
通过INDEX取值。文档最后一句也给出了提示:Use the INDEX function to get individual elements from the returned arrays. Data Types Accepts an array. Returns an array.

D2的Formula设置为INDEX(FREQUENCY(A1:A7,C2:C5),1)
D3的Formula设置为INDEX(FREQUENCY(A1:A7,C2:C5),2)
......
回复 使用道具 举报
xiwu
中级会员   /  发表于:2010-12-1 16:29:00
6#
英文不好,, 谢谢版主
回复 使用道具 举报
gw0506
超级版主   /  发表于:2010-12-1 16:34:00
7#
一般所谓不擅长的事,都是不需要亲自做的事。哈哈~
回复 使用道具 举报
xiwu
中级会员   /  发表于:2010-12-1 19:07:00
8#
还好有版主耐心指导
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部