| 发表于:2008-02-26 08:22:481楼 得分:0 |
dim intday as long '天数计数 dim day7 as long '7天计数 dim temp as long ,暂时的7天数值和 dim sumvalue as long ‘7天和最大值 for intday=1 to (244-7) for day7=intday to intday+7 '下面setdata.table.row.item.(day7)是表格行数据变量 '你可用自己的变量代替。 temp +=setdata.table.row.item.(day7) next '判断连续7天是否是最大 if temp > sumvalue then sumvalue=temp end if temp=0 next '最后sumvalue是7天的最大值 | | |
|