FunctionCountstr(STR1,Str2) dimtmp,i,j Ifstr1 =“” Orisnull(str1) j = 0然后,Elseifstr2 =“” Orisnull(str2) J = 1别的tmp = split(str1,str2) j = 0 fori = 0toubound(TMP) iftmp(i)<>“” thenj = j+1下一个Endif countstr = j最终功能