把这两个变量定义了,dim wenlifenke as stringdim i as integerfor i = 1 to 10activecell.value = kaoshimenpai(wenlifenke, i)next i还有你上面代码没有赋值,不知道你其他地方有没有赋值语句。 20210311
sub 呵呵() dim dyg as range,i% for each dyg in range("d:d")'这里变量名写错了 if dyg.value<>""then for i=1 to 1000 cells(i,"f")=val(right(dyg,5))/1000 next end if next end sub